Home » Developer & Programmer » Forms » How do you change color and label of a push button ? (form 6i)
How do you change color and label of a push button ? [message #306272] Thu, 13 March 2008 09:25 Go to next message
harshalonline22
Messages: 74
Registered: March 2007
Location: Pune
Member
How do you change color and label of a push button ?

Re: How do you change color and label of a push button ? [message #306279 is a reply to message #306272] Thu, 13 March 2008 09:40 Go to previous messageGo to next message
harshalonline22
Messages: 74
Registered: March 2007
Location: Pune
Member
How do you change color and label of a push button at runtime?
Re: How do you change color and label of a push button ? [message #306346 is a reply to message #306279] Thu, 13 March 2008 16:42 Go to previous messageGo to next message
Littlefoot
Messages: 21823
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Using the SET_ITEM_PROPERTY built-in. You'll need to use RGB colors; for example, to paint a button red, you'd choose
set_item_property('btn', background_color, 'r255g0b0');
set_item_property('btn', label, 'My label');
Re: How do you change color and label of a push button ? [message #308489 is a reply to message #306346] Mon, 24 March 2008 09:34 Go to previous messageGo to next message
harshalonline22
Messages: 74
Registered: March 2007
Location: Pune
Member
thanks little foot.
Re: How do you change color and label of a push button ? [message #308642 is a reply to message #306272] Tue, 25 March 2008 02:14 Go to previous messageGo to next message
islam175
Messages: 10
Registered: March 2008
Location: Jordan
Junior Member
hi
im working on froms 6i and the last code doesnt work with me could you tell me where i have to put it please??!!

[Updated on: Tue, 25 March 2008 02:17]

Report message to a moderator

Re: How do you change color and label of a push button ? [message #308686 is a reply to message #308642] Tue, 25 March 2008 03:56 Go to previous messageGo to next message
Littlefoot
Messages: 21823
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
As this question refers to change of color and label during runtime, it is you who should know WHEN exactly you'd like these properties to change.

It could be in the WHEN-NEW-FORM-INSTANCE trigger (for example), and it would be during runtime, but - it doesn't make much sense as you could set these properties during form design (why would you bother doing it programatically?).

But, if you'd like to make these changes after "something" happens, that's another story. But, it is you who knows that. I don't.
Re: How do you change color and label of a push button ? [message #407398 is a reply to message #308686] Wed, 10 June 2009 01:40 Go to previous message
ADNANTARIQ_85
Messages: 18
Registered: June 2009
Location: Faisalabad
Junior Member

ok


please find attachment (my_button) which is a solution of above mention problem ...
verify me...

no need to login when run




Regard.
M. Adnan

JK. Group Of Companies
(Faisalabad Pakistan)
  • Attachment: MY_BUTTON.fmb
    (Size: 56.00KB, Downloaded 2143 times)
Previous Topic: create a unicode text file
Next Topic: file rtf
Goto Forum:
  


Current Time: Sun Feb 09 12:15:25 CST 2025