home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 18 REXX
/
18-REXX.zip
/
vpxtra.zip
/
vpibuttn.hlp
(
.txt
)
< prev
next >
Wrap
OS/2 Help File
|
1994-04-14
|
8KB
|
267 lines
ΓòÉΓòÉΓòÉ 1. Overview of Image Button ΓòÉΓòÉΓòÉ
An image button is a button with a picture (in either ICON or BITMAP format)
instead of the usual text that is displayed.
You can use an image button for a toolbar type control in your VisPro/REXX
application, or any place where an image would be more useful than text for a
button.
ΓòÉΓòÉΓòÉ 2. Style page for the Image Button ΓòÉΓòÉΓòÉ
There are no extra styles for the image button, the basic style are the only
ones that apply.
Basic
Tab stop
Allows the user to tab to the Image Button. It is a good idea to provide a
tab stop for the first Image Button in a group.
Group
Allows the user to move within a group of objects using the arrow keys.
Select Group if this Image Button is the only object in a group or if it is
the first object in a group.
Disabled
The Image Button is present, but the user cannot select it.
Visible
The user can see the Image Button.
ΓòÉΓòÉΓòÉ 3. Events for Image Button ΓòÉΓòÉΓòÉ
The Image Button supports the following events:
When Clicked/Selected
The user clicks on the image button with the mouse, or selects the button
using the space bar
ΓòÉΓòÉΓòÉ 3.1. When Clicked/Selected ΓòÉΓòÉΓòÉ
This event is generated by the user clicking on the image button with the
mouse, or selecting the button using the space bar when the button has focus.
You will need to place the actions to be performed when the user selects the
button in this event.
ΓòÉΓòÉΓòÉ 4. Methods for Image Button ΓòÉΓòÉΓòÉ
The Image Button supports the following methods:
Get Item Value
Returns the text associated with the image button (see in the development
environment).
Set Item Value
Sets the text displayed on the image button until it is changed to either
bitmap or icon format.
Get item picture
Returns a picture handle similar to that of VpLoadPicture for use in a
VisPro/REXX application.
Set item picture
Sets the image for the button from an image loaded using VpLoadPicture.
Please note that it is recommended that any images you know will be used in
your application should be declared in the RESOURCE.VPR file.
Set ICON format
Tells the image button to display itself as an ICON. An image must already
have been set using Set item picture.
Reset ICON style
Turns off the icon format for the image button - it should revert back to
being a text button.
Set BITMAP style
Tells the image button to display itself as a BITMAP. An image must already
have been set using Set item picture.
Reset BITMAP style
Turns off the bitmap format for the image button - it should revert back to
being a text button.
Set Icon picture and format.
Sets the icon image and changes format at the same time.
Set Bitmap picture and format.
Sets the icon image and changes format at the same time.
ΓòÉΓòÉΓòÉ 4.1. Get item value ΓòÉΓòÉΓòÉ
Description Returns the text associated with the image button (see in the
development environment).
REXX Statement: value=VpGetItemValue(window, %s)
Parameters: Purpose
window Identifies the form in which the object resides.
itemid The numeric ID or the symbolic name of the object.
GETVALUE The method identifier.
Returns:
value The text of the button if it was displayed in non-image mode.
ΓòÉΓòÉΓòÉ 4.2. Set item value ΓòÉΓòÉΓòÉ
Description Sets the text displayed on the image button until it is
changed to either bitmap or icon format.
REXX Statement: CALL VpSetItemValue window,itemid,value
Parameters: Purpose
window Identifies the form in which the object resides.
itemid The numeric ID or the symbolic name of the object.
value Text for the pushbutton when not in image mode
ΓòÉΓòÉΓòÉ 4.3. Get item picture ΓòÉΓòÉΓòÉ
Description Returns a picture handle similar to that of VpLoadPicture for
use in a VisPro/REXX application.
REXX Statement: value=VpIButtn(window,itemid)
Parameters: Purpose
window Identifies the form in which the object resides.
itemid The numeric ID or the symbolic name of the object.
Returns:
value A picture handle that can be used wherever a VpLoadPicture
value can be used.
ΓòÉΓòÉΓòÉ 4.4. Set item picture ΓòÉΓòÉΓòÉ
Description Sets the image for the button from an image loaded using
VpLoadPicture. Please note that it is recommended that any
images you know will be used in your application should be
declared in the RESOURCE.VPR file.
REXX Statement: Call VpIButtn window, %s, 'SETPICTURE', value
Parameters: Purpose
window Identifies the form in which the object resides.
itemid The numeric ID or the symbolic name of the object.
SETPICTURE The method identifier.
value A handle obtained using VpLoadPicture.
ΓòÉΓòÉΓòÉ 4.5. Set ICON style ΓòÉΓòÉΓòÉ
Description Tells the image button to display itself as an ICON. An image
must already have been set using Set item picture.
REXX Statement: CALL VpIButtn window, itemid, "SETICON"
Parameters: Purpose
window Identifies the form in which the object resides.
itemid The numeric ID or the symbolic name of the object.
SETICON The method identifier.
ΓòÉΓòÉΓòÉ 4.6. Reset ICON style ΓòÉΓòÉΓòÉ
Description Turns off the icon format for the image button - it should
revert back to being a text button.
REXX Statement: CALL VpIButtn window, itemid, "RESETICON"
Parameters: Purpose
window Identifies the form in which the object resides.
itemid The numeric ID or the symbolic name of the object.
RESETICON The method identifier.
ΓòÉΓòÉΓòÉ 4.7. Set BITMAP style ΓòÉΓòÉΓòÉ
Description Tells the image button to display itself as a BITMAP. An image
must already have been set using Set item picture.
REXX Statement: CALL VpIButtn window, itemid, "SETBITMAP"
Parameters: Purpose
window Identifies the form in which the object resides.
itemid The numeric ID or the symbolic name of the object.
SETBITMAP The method identifier.
ΓòÉΓòÉΓòÉ 4.8. Reset BITMAP style ΓòÉΓòÉΓòÉ
Description Turns off the bitmap format for the image button - it should
revert back to being a text button.
REXX Statement: CALL VpIButtn window, itemid, "RESETBITMAP"
Parameters: Purpose
window Identifies the form in which the object resides.
itemid The numeric ID or the symbolic name of the object.
RESETBITMAP The method identifier.
ΓòÉΓòÉΓòÉ 4.9. Set Icon format and picture ΓòÉΓòÉΓòÉ
Description Sets the icon image and changes format at the same time.
REXX Statement: CALL VpIButtn window, itemid, "SETICONPICANDSTYLE", value
Parameters: Purpose
window Identifies the form in which the object resides.
itemid The numeric ID or the symbolic name of the object.
SETICONPICANDSTYLE The method identifier.
value A picture handle (value) loaded using VpLoadPicture
ΓòÉΓòÉΓòÉ 4.10. Set Bitmap format and picture ΓòÉΓòÉΓòÉ
Description Sets the icon image and changes format at the same time.
REXX Statement: CALL VpIButtn window, itemid, "SETBITMAPPICANDSTYLE", value
Parameters: Purpose
window Identifies the form in which the object resides.
itemid The numeric ID or the symbolic name of the object.
SETICONPICANDSTYLE The method identifier.
value A picture handle (value) loaded using VpLoadPicture