GetStringWidth Method (LISTVIEW)


PLBCMP GUI Only

 

The GetStringWidth method retrieves the minimum column width necessary to display the given string in a LISTVIEW object. The method uses the following format:

 

[label]

{object}.GetStringWidth

[GIVING {return}] USING [*String=]{string}

 

Where:

label

Optional. A Program Execution Label.

object

Required. A LISTVIEW object that is accessed.

return

Optional. A Numeric Variable that returns the minimum column width in pixels.

string

Required. A Character String Variable or literal containing the string to measure.

Flags Affected: EOS, OVER, ZERO

Note the following:

  1. Upon completion, {return} will contain the minimum width of the column in pixels. A zero is returned if the method is unsuccessful.

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

  3. If {return} is too small to contain the minimum width, the OVER Condition Flag is set.

  4. The EOS Condition Flag is always cleared.

  5. When using the PL/B Web Server, the 'GetStringWidth' method is not supported and the {return} value is always zero.

 

 

See Also: Method Syntax, LISTVIEW Methods

 



PL/B Language Reference GetNextItem Method (LISTVIEW) GetTopIndex (LISTVIEW)