HTMLCONTROL


 

Instructions Properties Methods Events Notes

 

The HTMLCONTROL object is a container which can be populated with HTML elements. The HTMLCONTROL object can exist and be used in programs executed by the runtimes PLBWIN, PLBNET, PLBSERVE, and PLBWEBSRV. To define a HTMLCONTROL, use one of the following statement formats:

 

(1)

[label]

HTMLCONTROL

[%]

(2)

[label]

HTMLCONTROL

(arraysize)

(3)

[label]

HTMLCONTROL

^

(4)

[label]

HTMLCONTROL

^,{target}

(5)

[label]

HTMLCONTROL

^(arraysize)

(6)

[label]

HTMLCONTROL

^(arraysize),({target}),...,({target})

 

Where:

label

Optional. A Data Label.

%

Optional. Denotes the item as being GLOBAL.

arraysize

Required. An integer decimal constant, CONST variable, or EQUATEd value indicating the number of array items.

^

Optional. Denotes the item as being a POINTER.

target

Required. The name of a previously defined data item of the same type.

Flags Affected: NONE

 

Instructions:

 

Object instructions are PL/B verbs that support the graphical objects.

 

ACTIVATE

Makes an object visible and allows the user to interact with it.

CHECKPROP

Tests whether a property is valid.

CREATE

Creates all necessary data structures for an object.

DEACTIVATE

Hides the object from the user.

DESTROY

Release the data structures obtained for an object.

EVENTREGISTER

Associates an event with a program execution label.

EVENTSEND

Sends an event to a specified object.

GETPROP

Obtain the value of a specific property.

LISTDEL

Removes an object from a COLLECTION.

LISTINS

Inserts an object into a COLLECTION.

SETFOCUS

Changes the current focus.

SETPROP

Set the value of a specific property.

 

Properties:

 

Properties are attributes of an object that define the object's characteristics or its behavior.

 

ANCHOR

Ties an object to one or more edges of its parent object.

BGCOLOR

Defines the background color.

CODEPAGE

Allows a user program to declare the encode format of program data being used.

DOCK

Defines which borders are docked to its parent and determines how it is resized.

ENABLED

Defines if user interaction is allowed.

HEIGHT

Defines the height of an object.

HWND

Returns Windows handle for an object.

INNERHTML

Allows rendering of user program HTML.

LEFT

Defines the left position of an object.

OBJECTID

User defined identification number.

RUNNAME

Defines the run-time name of the object.

SCROLLBAR

Specifies the type of scrollbar provided.

TABID

Defines the location in the tabbing sequence.

TOP

Define the top position of an object.

USERDATA

Allows application data to be assigned.

VISIBLE

Specifies whether an object is visible or hidden.

WEBHEIGHT

Specifies the CSS height property.

WEBLEFT

Specifies the CSS left property.

WEBPOSITION

Specifies the CSS position property.

WEBSTYLE

Specifies a list of CSS properties.

WEBTOP

Specifies the CSS top property.

WEBWIDTH

Specifies the CSS width property.

WIDTH

Defined the height of an object.

ZORDER

Defines the z-order of an object.

 

Methods:

 

Methods are encapsulated routines that act upon an object.

 

AddWebClass

Adds one or more HTML classes.

DisableJqEvent

Disable one or more jQuery events.

EnableJqEvent

Enable one or more jQuery events.

GetWebId

Obtains the HTML id attrbute.

GetWebStyle

Retrieves a specific CSS style.

RemoveWebClass

Removes one or more HTML classes.

SetWebStyle

Sets a specific CSS style.

 

ContextMenu

Controls whether a right-click action on a HTMLCONTROL allows a Windows context menu to appear.

Focus

Changes focus to a HTML element.

GetAttr

Retrieves HTML element attributes.

GetChecked

Retrieves the checked attribute as a boolean from a HTML element.

GetClass

Retrieves the class attribute from a HTML element.

GetCss

Retrieves the style of a HTML element.

GetDisabled

Retrieves the disabled attribute as a boolean from a HTML element.

GetEnable

Retrieves the data-plbenable attribute from a HTML element.

GetEvents

Retrieves the data-plbevent attribute from a HTML element.

GetHTML

Retrieves the inner HTML from a HTML element.

GetTabId

Retrieves the data-plbtabid attribute from a HTML element.

GetText

Retrieves the text from a HTML element.

GetValue

Retrieves the value of HTML form elements such as input, select and textarea.

InnerHTML

Load a HTML page.

LoadHTML

Load a HTML page from a file.

MakePict

Stores the contents of a HTMLCONTROL object into a PICT object.

SetAsClient

Assigns CLIENT methods to the HTMLCONTROL object

SetAttr

Changes low level HTML element attributes.

SetChecked

Changes the checked attribute of a HTML element using a boolean.

SetClass

Changes the class attribute in a HTML element.

SetCss

Changes the style of an HTML element.

SetDisabled

Changes the disabled attribute of a HTML element using a boolean.

SetEnable

Changes the data-plbenable attribute of a HTML element.

SetEvents

Changes the data-plbevent attribute of a HTML element.

SetHtml

Changes

SetTabId

Changes the data-plbtabid attribute of a HTML element.

SetText

Changes

SetValue

Changes the value of HTML form elements such as input, select and textarea

UpdateEvents

Scans the HTML elements and processes all data-plbevent, data-plbenable, and data-plbtabid attributes.

 

Events:

 

Events are actions recognized by an object for which you can write code to respond. Events can occur as a result of a user action or program code, or they can be triggered by the system.

 

JQueryEvent

Occurs when a javascript event has occurred with a HTML object.

 

Note the following:

  1. The HTMLCONTROL object is a specialized container that can be populated with HTML elements. The HTML elements are defined in the InnerHtml property data stream which can be simple HTML elements or a complex web page with supporting JavaScript, CSS, and HTML objects.

  2. When HTML elements are created in a HTMLCONTROL, they are enabled, disabled, hidden, made visible, or destroyed when one of these actions take place on the HTMLCONTROL.

  3. Multi-dimension arrays are supported to a maximum of fourteen dimensions.

  4. The ^ denotes Pointer Variable.

  5. Although a HTMLCONTROL may be defined as Global, it is DESTROYed during a CHAIN instruction..

 

 

See Also: Web Technologies WebView2 Support Object Definitions, Object Output Instructions

 



PL/B Language Reference HSCROLLBAR ICON