LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

disable Cotrols on a graph control

On a graph control I have few command buttons that have callback functions . Now , I have activated one command button  using function
SetActiveCtrl(   ); .
Now whenever i click on other command buttons transfer goes  over to other command buttons .But I want that time only that particular button to be the only active control i.e if I click on any button active control shall remain the same as it was set by SetActiveCtrl() ; .
 
Regards
Subrata Kuila
0 Kudos
Message 1 of 2
(2,848 Views)

I don't understand what do you mean by "controls on a graph control": the graph control hasn't any built-in button available so I think you are referring to buttons on the same panel as the graph control, otherwise you should clarify better your situation.

Normally, command buttons can be disabled by calling SetInputMode (PanelHandle, controlID, 0); that disables and dims the control. If you want to disable the button but do not want to dim it, you can use SetCtrlAttribute (panelHandle, controlID, ATTR_CTRL_MODE, VAL_INDICATOR); to exclude user interaction with the control. As a las resort, you could install a callback in your active-only command button and trap EVENT_LOST_FOCUS event either swallowing it (I don't remember wether this event can be swallowed) or calling SetActiveCtrl to restore it as the active control.



Proud to use LW/CVI from 3.1 on.

My contributions to the Developer Community
________________________________________
If I have helped you, why not giving me a kudos?
Message 2 of 2
(2,845 Views)