From: Gurdas on
Hi,
 
We have observed that placing text over a boolean button, stops it from responding to a value change event when the mouse is brought down over the text area of the button (except in cases when the text was 'boolean text')
 
To elaborate:
 
There are four possible ways of having text placed over a boolean button; namely1) Label2) Caption3) Boolean Text4) Text created by text tool
We also wish to underline one letter of the word which is placed over the text. But boolean text does not allow this. If you underline one letter, save, close and then reopen the VI; you find the complete word to be underlined!
This does not with method 1,2 and 4. BUT, when using method 1,2 and 4 if the text is placed over the button, the button does not respond to value change!!
 
Any inputs what is causing this and way out?
 
Thanks,Gurdas
From: Gurdas on
Andrew, thanks for your reply.
 
I too deduced that the text is "covering" my button. But then whats the way out? I need the text to be on the button and I still want the button to respond if I click anywhere on it. Right now, it responds when I click outside the textbox area.
 
Second, why doesn't the boolean text pose the same problem?
 
- Gurdas
From: AndrewAlford on
The Boolean Text does not pose a problem because it is built into the control, you only choose its value and if it is visible or not.
OK, for a work around you will really have to want this text on the button bad. The only way I could get the text I wanted onto the button in the format I wanted was to customize the control doing the following.
Please note I am by no means an expert with customizing controls so if any one in the forum knows how to do this better PLEASE by all means reply as I would like this information as well.
1. Open a blank VI and create a Text box with the text and format including sizeyou wish. Make sure your use the paint function to make the backround of the text box the same color as the Button or a different color if you like. If you leave it as transpraent the result will be a white backround using this process.
2. Copy the text box to the clip board. (ctl-c)
3. Open Paint and paste, save the file as *.jpg
4. Using a picture editor open the *.jpg and crop the picture so only the text is left and save the file and copy it to the clipboard.
5. Place the boolean button you wish to use on the front panel, Make the Boolean Text NOT visible if it isn't already, Size , right click on it goto Advanced->Customize....
6. You are now in the costomize contol window, Right click on the Boolean goto Import Picture->Decal. This has now pasted a picture of the text on the button.
7. Save the control and say yes to replace it on the front panel.
You will have to do this with each button for different text (There has to be a better way???)
Anyway hope this is of some help.
Regards,
 
 | 
Pages: 1
Prev: EZtwain sample Code
Next: xcontrol tutorial