LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Setting focus to a control on a tab panel

I am using easytab control. I need to set focus to a control on one of
the tab panels. I can make the tab panel active by using
EasyTab_SetAttribute function, but after than if I try to set focus by
using SetActiveCtrl funtion, it doesn't work.

Here is segment of code.

EasyTab_SetAttribute(panelHandles->ConfigHandle,
panelHandles->MainTabCtrl, ATTR_EASY_TAB_ACTIVE_PANEL,
panelHandles->NodeHandle);
SetActiveCtrl(panelHandles->NodeHandle, NODE_USER_NAME);



vishi
0 Kudos
Message 1 of 2
(5,391 Views)
SetActiveCtrl() can be used on a control on an easytab tab panel.
Just to confirm you have all your handles right, double-check that the following is true:
MainTabCtrl is a tab control on the ConfigHandle panel.
NodeHandle is a tab panel on MainTabCtrl.
USER_NAME is a control on NodeHandle with a panel constant NODE (guessing at your constant names following the convention PANEL_CONTROL).
I don't use a structure like your panelHandles, but I often do something like this:
EasyTab_SetAttribute (hMainPanel, tabCtrlMain, ATTR_EASY_TAB_ACTIVE_PANEL, hScriptPanel);
SetActiveCtrl (hScriptPanel, SCRPTPANEL_EXECUTECOMMAND);
hMainPanel is a handle to my main panel.
tabCtrlMain is an easytab tab control on hMainPanel.
hScriptPanel is a handle to a tab panel on tabCtrlMain.

EXECUTECOMMAND is on control on hScriptPanel with a panel constant SCRPTPANEL.
Have you looked at the return value from SetActiveCtrl?
0 Kudos
Message 2 of 2
(5,391 Views)