Picture Button

 

The Picture Button control is a push button that displays a bitmap on its face instead of text and a background color.

You indicate the bitmap to display by placing the bitmap file name and, optionally, the file path in the Background Bitmap Attribute of the control.

If you supply a file path, WinBatch will check the current working directory first for your bitmap file. The current working directory  is always searched before the file path is used to find a bitmap.

Although the control does not normally display text, you can place a text string in Text attribute. WinBatch will display the text when it cannot find the bitmap indicated in the Background attribute while loading the dialog template. Also, if you include the an ampersand in the text, your users will be able to use an accelerator key to navigate to button just like they can with regular push buttons.

Your bitmap does not need to be the same size as the Picture Button control. The appropriate stretch or compress is applied to the bitmap, so that the entire image is displayed. However, if the aspect ratio of your control is significantly different from the bitmap’s aspect ratio, your image may appear distorted.

To resize the Picture Button control, simply click on the edge and drag with the left mouse button.

 

image\pict.gif

 

Control Attributes

 

Calendar

Check Box

Com Control

DateTime

Drop-down Combo Box

Edit Box

File List Box

Group Box

Item List Box

Menu Bar

Menu Item

Multiline Edit Box

Picture

Picture Button

Push Button

Radio Button

Report View

Spinner

Static Text

Variable Text

 

 

For example, the line in the script generated by the WIL Dialog Editor may look like:

 

MyDialog003=`124,118,043,018,PICTUREBUTTON,"Pictbutton_2",DEFAULT,"Pict button 2",2,3,DEFAULT,DEFAULT,DEFAULT,DEFAULT`