NETCONTROL


9.2B, PLBNET GUI Only

square.png Properties

square.png Instructions

 

The NETCONTROL instruction defines a data item for a .Net control object. This object can only be executed in a PLB program executing under a PLBNET runtime or a PLBSERVE runtime with a PLBCLINET client. The actual object is determined from the CLASS and ASSEMBLY parameters specified during the CREATE instruction. To define a NETCONTROL, use one of the following statement formats:

 

 

[label]

NETCONTROL

[%][{keyword}[,{keyword}]

 

[label]

NETCONTROL

(arraysize)[{keyword}[,{keyword}]

 

[label]

NETCONTROL

^

 

[label]

NETCONTROL

^,{target}

 

[label]

NETCONTROL

^(arraysize)

 

[label]

NETCONTROL

^(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.

keyword

Optional. Keywords that define further define the object.

Flags Affected: NONE

Note the following:

  1. The NETCONTROL object is a .NET object that is visible and can exist on a PL/B WINDOW or PANEL object.

  2. The creation and use of a NETCONTROL is the same as the NETOBJECT.

  3. A NETCONTROL accepts a character variable or literal with a "True" string for internal properties. When the "True" character string is detected, the runtime generates a numeric value of one (1) to represent a true state. This simplifies the end-user usage where a boolean value is expected. Notice, the "True" is case sensitive and must exist as an exact string form. If a DIM or literal character string is specified for any non-internal.NET properties, the character string is passed to the .NET framework as a "System.String" control class type.

  4. The runtime detects a CTRL+TAB key sequence or SHIFT+CTRL+TAB key sequences when a NETCONTROL object has the focus. In these cases, the runtime removes the focus from the NETCONTROL object and places it on the next appropriate NETCONTROL or GUI object in the TABID order.

  5. Changes have been implemented in the .NET runtimes to address the following issues for the 'System.Windows.Forms.DataGridView' class created using a NETCONTROL object.
     

  6. Issue 1

    With 'AcceptTab=True' being used, entering a TAB character while a DataGridView cell was in edit mode could cause an audible beeping sound to occur. The audible sound in this case is being generated by the DataGridView with no plausible explanation.

     

    Modifications were made for runtime to detect a TAB character for a DataGridView .NET object in a NETCONTROL. In this case, the runtime simulates the tab operations to move from cell to cell. The simulated tabbing operations provides a work around to eliminate DataGridView beeping sound when a TAB is keyed.

     

    Issue 2

    With 'AcceptTab=True' and entering a TAB character while the DataGridView current cell position was the last physical cell in the DataGridView, the program focus was not being positioned to the next NETCONTROL or GUI object in the TabID sequence. In addition, a 'Shift+TAB' character sequence while the DataGridView current cell position was the first physical cell, the program focus was not changed to a NETCONTROL or GUI object in the TabID sequence prior to the DataGridView.

     

    Modifications to simulate the tab operations have implemented changes to set the focus appropriately when the DataGridView cell position was the first or last cells in the DataGridView. The StandardTab property from the DataGridView determines the tabbing mode that is used for the simulated tabs. See the MSDN documentation for the DataGridView StandardTab for more details.

     

    Issue 3

    With 'AcceptTab=True' and 'EnterTab=True' for a DataGridView created in a NETCONTROL, a double click operation to invoke the edit mode in a DataGridView cell following by a TAB or ENTER key did not work as expected.

     

    Modifications to detect a focus change to the DataGridView have been implemented to allow the TAB or ENTER keys to work properly when an end-user clicks to a cell in the DataGridView object.

  7. This object is not available when using the PL/B Web Server.

 

 

See Also: Object Definitions, Object Output Instructions

 



PL/B Language Reference MREGION NETOBJECT