Default Image (ImgDefault)

The image that is displayed as the button or tab.

ImgDefault="@ImageFile | ^GlyphName"




Supported in Grid?





Use this property if you want to represent a button or tab as an image. The size of the image affects the size of widget. Uniface looks for images in the directory specified by the Images setting in the [paths] section of usys.ini.

For command buttons, this property only works if the Representation property is set to Uniface.

For the TabEx widget, specifying a value for this property overrides the Tab Colors property, and enables the Active Image, Hover Image, Tab Strip Image, Scroll Buttons properties to work (if defined).

Setting in ProcScript

$fieldproperties(FLD1) = "ImgDefault=@filesave.png"

Specifying Images for Tabs

The following ProcScript code sets the images to display for a tab widget in its normal state, when a mouse cursor hovers over it, and when it is selected:

vProperties = ""; string variable to contain widget properties

; Create a list of widget properties
putitem/id vProperties,"imgdefault", "@gradient_default_blue.jpg"
putitem/id vProperties,"imghover","@gradient_hover_white.bmp"
putitem/id vProperties,"imgselect", "@gradient_select_green.bmp"

; Assign the properties list to the Tab widget
$fieldproperties(TAB_FLD) = vProperties
Images for Tabs

Images used for tabs

Related Topics