No. 2. Adding dimmed states to your customized boolean buttons
This tutorial shows you a simple way to customize your boolean controls
In this tutorial you will use Paint to create pictures for 4 states of a boolean button and add the pictures to the button. Boolean buttons can have four states, false, false while pressed, true and true while pressed. The pressed states are dimmed.
Creating the pictures
Open Paint and create a 16 by 18 pixels/dots picture. I have added pictures for a button you can use to turn horisontal grid lines on/off in a chart:

The leftmost button is the false state, next is true state, then false while pressed state and finally true while pressed state. In Paint the frame and the gridlines are one dot wide. I have saved all four pictures in the attached paint file (.JPG).
Adding the pictures to the button
- Open an empty front panel in Labivew
- Right click the panel and go to the Classic Boolean Controls palette
- Drop a Checkbox button on the front panel
- Go to your pictures in Paint and mark your false state picture. Then copy it
- Return to Labview, left click your button and choose Mechanical Action - Switch When Released. This will enable all four states.
- Choose Edit - Customize Control. The Customize control window opens with your button displayed
- Click the Wrench button on the tools menu bar. It switches to a pair of Twizers
- Right click your button and scroll down to Picture Item. Four pictures are displayed
- Make sure the first picture is selected. This is the buttons False state picture
- Right click the button and choose Import Picture from Clipboard. The copied picture is pasted onto the button's False state
- Return to Paint and copy the second picture, the True state picture
- Right click your button and scroll down to Picture Item. Select the second picture and import picture from clipboard
- Return to Paint and copy the third picture, the False while pressed state picture
- Right click your button and scroll down to Picture Item. Select the third picture and import picture from clipboard
- Return to Paint and copy the fourth picture, the True while pressed state picture
- Right click your button and scroll down to Picture Item. Select the fourth picture and import picture from clipboard
- Exit the Customize control window answering Yes to the Replace the original control... question and choose not to save the changes
- You return to the front panel and your button has four new pictures!
Known problem
If you don't succeed in pasting from clipboard to the button click outside the button and then choose Edit - Paste from the labview menu. A copy of your picture is pasted on to the panel. Right click your button and choose Import Picture from Clipboard. You should now mange to paste the correct graphics to the button. Finally delete the copy of your picture that you pasted on to the panel.
Comments
- This is a simplified procedure. The button you edited exists only in the vi in which you created it. You can make copies of the button but if you customize one of the copies the changes will only apply to that customized copy