Image Size (ImgSize)
Defines the size used to display an icon in widgets and menu items, when both an image
and text are defined for the value. Valid values are IMG_SMALL
(default), IMG_MEDIUM
,
IMG_LARGE
, IMG_XLARGE
, or IMG_NONE
.
"ImgSize=
IMG_SMALL
| IMG_MEDIUM
| IMG_LARGE
| IMG_XLARGE
| IMG_HUGE
| IMG_NONE
"
Value |
Size in Pixels |
---|---|
|
16 x 16 |
|
20 x 20 |
|
24 x 24 |
|
32 x 32 |
|
128x128 (Command Button only) |
|
0; suppresses display of the image |
Applies To
Usage
Dynamic? |
No |
Supported in Grid? |
No |
Dependencies: |
For command buttons, this property is
supported only when the Representation property is set to
|
Description
Menu items and some widgets can include both an icon and text in the value. The default icon size is 16x16 pixels, but this can increased to as much as double the size.
To set the value in ProcScript, use $fieldproperties. For example:
$fieldproperties(SaveBtn) = "imgsize=IMG_MEDIUM"
Command Button
The size of the widget itself cannot be changed dynamically. If you change the ImgSize or ImageLabelAlign properties in ProcScript, ensure that the command button dimensions are large enough for the image and the text to fit.
Drop-Down List and List Box
In list box and drop-down list widgets, changing the ImgSize changes the amount of space allocated for each item in the ValRep.
IMG_SMALL |
IMG_LARGE |
---|---|
Menus
For menus, the ImgSize property can only be set globally for all menus.
Uniface always reserves an area in front of a menu item for an image. This ensures that some menu items have an image defined and others do not, the text of all menu items is correctly aligned. Changing the size of images in menus also changes the amount of space reserved.
Setting Image Size for Menus
Assume that some of the
File menu items have icons. For example. the Open
item is defined as : "@open.png!Open"
. In the
usys.ini file, the following properties defined for menus:
[application] menu=umenu(backcolor=#fdfdfd;forecolor=black;backcolorselect=#c0ddfc)
The default image size is
IMG_SMALL
, which looks like this:
If the image size is change to
IMG_XLARGE
, the images are enlarged.
[application] menu=umenu(ImgSize=IMG_XLARGE;backcolor=#fdfdfd;forecolor=black;backcolorselect=#c0ddfc)