InsertColumn Method (LISTVIEW)


PLBCMP GUI Only

 

The InsertColumn method adds a new column into a LISTVIEW object. The method uses the following format:

 

[label]

{object}.InsertColumn

[GIVING {return}] USING [*Text=]{text}:

 

 

[*Width=]{width},[*Index=]{index}[:

 

 

[*Format=]{format}]

 

Where:

label

Optional. A Program Execution Label.

object

Required. A LISTVIEW object nto which a column is inserted.

return

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

text

Required. A Character String Variable or literal that specifies the label for the new column.

width

Required. A decimal number or Numeric Variable that specifies the width of the new column in pixels.

index

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

format

Optional. A decimal number or Numeric Variable that specifies the label justification as described below.

Flags Affected: EOS, OVER, ZERO

Note the following:

  1. The optional {format} value is a constant as defined in PLBMETH.INC or a numeric variable indicating the following format values:

  2.  

    Value

    Constant

    Meaning ...

    0x0

    LVCFMT_LEFT

    The column is left justified. (default)

    0x1

    LVCFMT_RIGHT

    The column is right justified.

    0x2

    LVCFMT_CENTER

    is centered.

    0x100

    LVCFMT_FIXED_WIDTH

    The column is not resizable. (Version 6.00 and Windows Vista)

    0x800

    LVCFMT_IMAGE

    The column displays an image from an imagelist. (Version 4.70).

    0x1000

    LVCFMT_BITMAP_ON_RIGHT

    The column displays a bitmap image to the right of the text. (Version 4.70)

    0x8000

    LVCFMT_COL_HAS_IMAGES

    The header item contains an image in the imagelist. (Version 4.70)

    0x40000

    LVCFMT_NO_DPI_SCALE

    If not set, CCM_DPISCALE will govern scaling up fixed width. (Version 6.00 and Windows Vista)

    0x80000

    LVCFMT_FIXED_RATIO

    Width will augment with the row height. (Version 6.00 and Windows Vista)

    0x100000

    LVCFMT_SPLITBUTTON

    Column is a split button. The header of the column displays a split button. (Version 6.00 and Windows Vista)

 

  1. The behavior associated with these {format} values depends on the version of the Windows components that are being used. For additional information, see the Microsoft documentation for the Windows LVM_INSERTCOLUMN or LVM_SETCOLUMN messages of a LISTVIEW control.

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

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

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

  5. The EOS Condition Flag is always cleared.

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

 

 

See Also: Example Code, Method Syntax, LISTVIEW Methods

 



PL/B Language Reference InsertAttrRGB Method (LISTVIEW) InsertColumnBgClr Method (LISTVIEW)