Home » Developer & Programmer » Forms » load image when button pressed
load image when button pressed [message #78897] Thu, 28 March 2002 02:02 Go to next message
Isobel
Messages: 1
Registered: March 2002
Junior Member
Hi, i'm trying to create a form with buttons that change colour when certain values are entered. I read that it's not possible to change the colour of a button so i've been trying to load a bmp image onto it instead...but i can't find the code. I've tried putting this in the WHEN-BUTTON-PRESSED trigger
BEGIN
load_image('Seat.Seat_No','c:WindowsDesktopred button.bmp');
END;

but it says i have to declare load_image. If anyone can help at all i would be very greatful.

Iso *waves*
Re: load image when button pressed [message #78898 is a reply to message #78897] Thu, 28 March 2002 02:15 Go to previous message
S. La Rocca
Messages: 6
Registered: March 2002
Junior Member
You can change the icon of a button at runtime. Therefor you have to use:

set_item_property('Seat.Seat_No',icon_name, 'red_icon');

Notice:
When defining the Icon Filename property, do not include the icon file extension (.ico, .xpm, etc.). For example, enter red_icon, not red_icon.ico.

The icon filename should not end in any of the following five letters: A, L, M, S, and X. (Neither upper-case nor lower-case are allowed.) These are reserved letters used internally for icon sizing.

Use the platform-specific environment variable to indicate the directory where icon resources are located. For example, the Microsoft Windows name for this variable is UI60_ICON.

Ciao Stephan
Previous Topic: Free Developer/2000 Tutorial
Next Topic: installation
Goto Forum:
  


Current Time: Thu Jun 04 00:16:54 CDT 2020