lvrat:
You can also change the colors for the button states using the UI editor instead of doing it programmatically.
1. Select the paintbrush tool on the UI editor tool bar.
2. Right click on the button you want to change.
3. Select and left click the color you want. You'll see the color of the control change as you mouse-over the colors displayed after you right-click.
4. Select the edit tool (a dashed-line box) on the UI editor tool bar.
5. Double-click on the button you want to change.
6. Change the Initial State to the opposite of whatever it was, and click OK.
7. Repeat steps 1 through 3 for that state.
If you want to restore the initial Initial State, repeat steps 4 though 6. The control will assume its Initial State when you select the paintbrush tool, so you can only paint the Initial State. That's why you need to change the Initial State so you can paint the other state.
You can also unlock the panel and control colors in the UI editor.
1. Double click on a blank spot on the panel in the UI editor.
2. Click on Other Attributes.
3. In CVI 6.0, uncheck Conform to System Colors. In CVI 2010, uncheck both Conform System Colors and Use Windows Visual Style for Controls.