PictureWidth
property for PowerScript controls
Applies to
PictureListBox, DropDownPictureListBox, TreeView, Toolbar,
RibbonComboBoxItem controls
Description
The PictureWidth property specifies in pixels the display width of
all the pictures in the control. In a script, this property can be set
only if there are no images in the PictureName property array. In the
painter, you can change this value whether or not there are images in the
Picture list.
Usage
In a painter
To set the picture width:
-
Select the desired value from the Width drop-down list on the
Pictures tab page of the control’s Properties view.The choices of 16 and 32 are standard pixel widths for icons. If
you select Default, PowerBuilder uses the width of the first picture
in the PictureName array as the width for all the pictures.
In scripts
The PictureWidth property takes an integer value. This value can be
set only before the first call to the AddPicture function or after calling
DeletePictures. If this value is set to 0, then the size of the first
picture in the PictureName property array is used as the width for all the
pictures.
The following line sets the width for a TreeView’s pictures to 16
pixels:
|
1 |
tv_1.PictureWidth = 16 |