Measurement Studio for VC++

cancel
Showing results for 
Search instead for 
Did you mean: 

VC++: how to set numeric edit text to black when control is SetEnabled(FALSE)?

I like the behavior of setting disabling the numeric edit control in VC++ (m_numEdit.SetEnabled(FALSE)), but want the disabled text to be black at times instread of gray. How is this done?
0 Kudos
Message 1 of 2
(2,931 Views)
When the CNiNumedit control is disabled its textcolor will always be set to gray, making the only color changes to the text available when it is enabled. What you can do to basically simulate what you are asking for is to set the mode of the CNiNumedit control to CNiNumEdit::ModeIndicator so that the end-user cannot manipulate it and possibly make it look as though it is disabled by changing the inc/dec buttons to look as they do when disabled via the buttons' image property (or you could just set the background color of the CNiNumedit to gray or something like this to indicate that it is disabled).

Jason F.
Applications Engineer
National Instruments
www.ni.com/ask
Message 2 of 2
(2,931 Views)