02-14-2012 12:17 PM
I want to adapt programatically the image of one boolean button that enables a device. The idea is create the executable, and depending on the device type (given by a config file) adapt the button appearance, with an image that shows the specific device it refers to.
Is it possible to change the boolean text image programatically?
Thank you very much!
02-14-2012 12:23 PM
Can you not use several booleans and set them all to invisible until you know which one you need?
This would add extra logic code though.
I don't think you can change the actual control/indicator image. Or did you mean the text itself?
02-14-2012 12:31 PM
Thanks for your reply! Actually that's the solution I have in mind, although that implies a significant increase in the controls and that's why I was considering changing only the image. I refer to the control/indicator image, not the text, sorry for not expresing myself clearly.
02-14-2012 12:33 PM
You could always create your own control.
Then you could use any image you want.
02-14-2012 01:12 PM
You can't change the image in the runtime. Could you use a picture control instead? You won't have the button "look and feel", but you can change the picture at runtime. You can still respond to a mouse click on the picture to be the equivalent of clicking on a button.
02-14-2012 01:31 PM
If you have a limited set of pictures, consider using a picture ring indicator, with a transparent boolean placed on top of it.