REFERENCE
CreatePictureButton

This command is new in build 189

Many thanks to Katharsis for suggesting this command.

Creates a button with a picture on it.

Syntax

<CreatePictureButton name x y file [text]>

Parameters

Name is the name of the button.

X is the horizontal screen coordinate of the window's upper left corner.

Y is the vertical screen coordinate of the window's upper left corner.

File is the pathname of the picture file.

Text is the caption that appears on the button.


Remarks

A newly created picture button is the same size as its picture. After you create it you can change its size with SetWinSize or SetWinRect. If you do this, the picture will stretch or shrink to fit the new dimensions.

The program has three button styles. This command creates the picture style. You can create the other styles with CreateButton and CreateColoredButton.

For more information about buttons, see CreateButton.


Picture files

Your picture file can be a GIF, JPEG, PNG, TIFF, Exif, WMF, or EMF.


Use AutoExec

You should create all your buttons and panels in an AutoExec command that executes automatically when the script loads.


Example

<Command AutoExec>
    <CreatePictureButton B1 100 100 "c:\\doodads\pix\button.jpg">


Related topics

CreateButton


This page was last revised on November 2, 2009