InsertColumnBgClr Method (LISTVIEW)


8.7, PLBCMP GUI Only

 

The InsertColumnBgClr method adds a special column into a LISTVIEW object that allows specification of the background color of a line item row. The method uses the following format:

 

[label]

{object}.InsertColumnBgClr

[GIVING {return}] USING [*Index=]{index}

 

Where:

label

Optional. A Program Execution Label.

object

Required. A LISTVIEW object into which a special column is inserted.

return

Optional. A Numeric Variable that returns the new column number.

index

Required. A Numeric Variable or decimal number that specifies zero-based position of the special column.

Flags Affected: EOS, OVER, ZERO

Note the following:

  1. The data string stored into each sub item of the new column specifies a hexadecimal string that represents the RGB background color value of the line item. The expected string format of a line item color is '0xRRGGBB'.

  2. The background color column is inserted with a width size of zero. This allows the color column to exist and be used in a LISTVIEW without being visible to a user.

  3. It is also possible to use SortColumn to sort the color data items. This can group line items with expected color characteristics.

  4. Upon completion, {return} will contain the new zero-based column number or -1 if the method fails.

  5. If the value returned is zero, the ZERO Condition Flag is set.

  6. If {return} is too small to contain result of the method, the OVER Condition Flag is set.

  7. The EOS Condition Flag is always cleared.

  8. The {index} value cannot be zero. Otherwise, the {return} value is -1 to indicate a failure. The special column cannot be inserted as column zero because this creates a conflict when reporting the existence of the column using the GetBgColorColumn method.

  9. For improved performance in the Application Server environment, do not specify the optional return value unless needed.

 

 

See Also: Method Syntax, LISTVIEW Methods

 



PL/B Language Reference InsertColumn Method (LISTVIEW) InsertColumnEx Method (LISTVIEW)