Page 1 of 1

property change button with propery lable

Posted: Tue Jun 05, 2012 12:33 pm
by skakooli2
Hi,
I want to create button that will change some property, and that it's text will be taken from another property value.
Is that possible?
Thanks, Shakhar.

Re: property change button with propery lable

Posted: Wed Jun 06, 2012 1:17 pm
by Richard Naninck
Take a look at multi state buttons. You cannot put a text from another property but you can define a unique text per button state. Mayby that will do for you.

Re: property change button with propery lable

Posted: Thu Jun 07, 2012 6:18 am
by skakooli2
Hi,
Thank you for the reply.
A multi state button is a button that displays another picture at each state and that's not what i'm looking for.
I need a button that will change some propery and that the text of the button will be taken from another property.
Basicly, i want to display text from excel file.
I know how to read an excel file and pass it's text to HB.

I thought to change the XML file with a script
The script will search for the button definition in the XML, and change it's text to the desired text.
But it's very hard to do, and i will glad if I have a better solution.

Thanks, Shakhar.

Re: property change button with propery lable

Posted: Tue Jun 12, 2012 4:13 am
by lostdreamer
Whenever I need something like that, i simply create a button to controll property A, and put a label on top of it with the value of property B.
This usually works ok.

Re: property change button with propery lable

Posted: Tue Jun 12, 2012 6:51 am
by Richard Naninck
You cannot press the button where the text is displayed so you need to create a button large enough to show some free touch space (space not covered by the text property)

Re: property change button with propery lable

Posted: Tue Jun 12, 2012 1:51 pm
by markd
Or make the pushable button transparent?

Re: property change button with propery lable

Posted: Tue Jun 12, 2012 1:51 pm
by skakooli2
Ok thanks.

Re: property change button with propery lable

Posted: Tue Jun 12, 2012 2:51 pm
by Richard Naninck
You would actually need to create a button with a transparant hole in it because once you press the button, the text will fall behind it and once the text is refreshed it will appear on top of the button again. Not very consistent. I use this trick with indicators in buttons.