PictureIndex – PB Docs 126

PictureIndex property for PowerScript controls

Controls

ListViewItem, TreeViewItem

Description

The PictureIndex property identifies pictures in the control’s
Picture list. For ListViewItems, the index identifies the large,
small, and state picture associated with the item.

For TreeViewItems, the index identifies the picture displayed
to the left of the item label. If the index is 0, no picture is
displayed. You can set the PictureIndex property only for TreeViewItems
with scripts, but you can add pictures to the control’s
Picture list in the painter.

Usage

In a painter

proc.png To associate pictures with a Listview item:

  1. Select the Large Picture tab page, Small
    Picture tab page, or State tab page from the ListView control’s
    Properties view.

  2. Do one of the following:

    • In
      the rows provided in the Picture Name field, type the complete path and
      name of the files containing the desired pictures.

    • Use the Browse button.

    • Select one or more pictures from the Stock Pictures
      list.

  3. Select the Items tab page from the ListView control’s
    Properties view.

  4. Use the row numbers from the Picture Name list
    to specify the Picture Index for each List View Item on the Items
    tab page.

proc.png To add pictures to a TreeView control’s
picture list:

  1. Select the Pictures tab page from the TreeView
    control’s Properties view.

  2. Do one of the following:

    • In
      the rows provided in the Picture Name field, type the complete path and
      name of the files containing the desired pictures.

    • Use the Browse button.

    • Select one or more pictures from the Stock Pictures
      list.

You associate pictures in the TreeView control’s
picture list with TreeViewItems using scripts.

In scripts

This example illustrates how to get a ListViewItem object
and change the value of PictureIndex:

For more information about scripting ListView and TreeView
controls, see “Using ListView Controls” and “Using
TreeView Controls” in Application Techniques.


Document get from Powerbuilder help
Thank you for watching.
Was this article helpful?
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x