Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

STYLE propertyBit-wise operatorsEdit Table Column StylesAUTOSIZECOL propertyCOLDATA propertyCOLLABEL messageCOLWIDTH messagePSStyle propertyIConv( expression, "MX"), [expression, "MX")], RTI_Style_Equates

Example

 
Code Block
declare subroutine LockColumns(Table, Lock)
* This function horizontally locks the specified
* number of edit-table columns
 
Parameters:
Table - [in] id of edit table control
Lock  - [in] number of columns to lock */
 
declare function   Send_Message
declare subroutine Send_Message
 
equ LOCK_STYLE$ to 8192
 
ColCount = Get_Property(Table, "LIMIT") <1>
Styles   = Send_Message(Table, "COLSTYLE", 0, "")
for i = 1 to ColCount
  if i <= Lock then
    Styles<i> = bitor(Styles<i>, LOCK_STYLE$)
  end else
    Styles<i> = bitand(Styles<i>, bitnot(LOCK_STYLE$))
  end
next i
Send_Message(Table, "COLSTYLE", 0, Styles)
return

...

Example 2

...

Code Block
* Create a dropdown in column 1
Declare function Send_Message
 
EditTable = @Window:".TABLE_1"
 
// Column 1 is the column being set up as a drop down.
// Flag the column as a drop down column.
 
ColStyle = Send_Message(EditTable, "COLSTYLE", 1)
ColStyle = bitor(ColStyle, 0x20000)
ColStyle = Send_Message(EditTable, "COLSTYLE", 1, ColStyle)
 
// Establish the list of values in the drop down.
ColFormat = Send_Message(EditTable, "COLFORMAT", 1, "Item One":@VM:"Item Two":@VM:"Item Three")

 

...

Example 3

...

Code Block
* Create a checkbox in column 2
Declare function Send_Message
 
EditTable = @Window:".TABLE_1"
 
// This establishes the check box style for column two.
ColStyle = Send_Message(EditTable, "COLSTYLE", 2)
Colstyle = 65536
ColStyle = Send_Message(EditTable, "COLSTYLE", 2, ColStyle)
 
// This establishes the check box text for column two.
ColFormat =  Send_Message(EditTable, "COLFORMAT", 2, "Check this box")

 

...

Example 4

...

Code Block
* Add Drag and Drop to Columns within an Edittable
EditTable = @Window:".TABLE_1"
 
* Enable drag and drop to Column 1
ColStyle = Send_Message(EditTable, "COLSTYLE", 1)
ColStyle = bitor(ColStyle, 0x10000000) ; * enabledrag
ColStyle = bitor(ColStyle, 0x20000000) ; * enabledrop
ColStyle = Send_Message(EditTable, "COLSTYLE", 1, ColStyle)
 
* Enable drag and drop to Column 2
ColStyle = Send_Message(EditTable, "COLSTYLE", 2)
ColStyle = bitor(ColStyle, 0x10000000) ; * enabledrag
ColStyle = bitor(ColStyle, 0x20000000) ; * enabledrop
ColStyle = Send_Message(EditTable, "COLSTYLE", 2, ColStyle)

 

...

Example 5

...

Code Block
* Multi-line column headings
* Change the Column Headers to multi-line and place data within the header
tableCtrl = @window:".TEST_TABLE"
 
* Set the column header for column 1 to multi-line
ColStyle = Send_Message(tableCtrl, "COLSTYLE", 1)
ColStyle = bitor(colstyle,262144)
ColStyle = Send_Message(tableCtrl, "COLSTYLE", 1, ColStyle)
 
* Set the column header for column 2 to multi-line
ColStyle = Send_Message(tableCtrl, "COLSTYLE", 2)
ColStyle = bitor(colstyle,262144)
ColStyle = Send_Message(tableCtrl, "COLSTYLE", 2, ColStyle)
 
* Set the height of the column headers for the edittable
x = set_property(tableCtrl,'HEADERHEIGHT',60)
 
* Set the header text
headerText<1> = "This line will wrap within the header."
headerText<2> = "This line contains":char(13): "carriage returns."
x = Set_Property(tableCtrl,"LABEL",headerText)