PictureOnRight  Pointer

Chapter 3: Property Descriptions and Usage

PictureWidth

Applies to

TreeView, Toolbar controls

Description

The PictureWidth property specifies in pixels the display width of all the pictures in the control. Pictures you select for buttons on the Toolbar control are automatically scaled to the PictureWidth and Picture Height settings.

For the Toolbar control, you can set the PictureWidth and PictureHeight properties in script whether or not there are images in the PictureName property array. For the TreeView control, the PictureName array must be empty before you can set the PictureWidth and PictureHeight properties in script, although you can change these values in the painter whether or not there are images in the Picture list.

Usage


In a painter

StepsTo set the picture width:

  1. 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, PocketBuilder 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 only be set 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.

tv_1.PictureWidth = 16





Copyright © 2005. Sybase Inc. All rights reserved. Pointer

View this book as PDF