03-12-2012 11:40 AM
03-13-2012 02:40 AM
03-13-2012 09:27 AM
Not sure about being a tab panel, but at least you can see whether it is a child panel or not: a tab page is a child of the panel that holds the tab control.
03-13-2012 11:27 AM
When you get the panel handle of a tab page, there are restrictions to what you can do with it. For example, you can't call DiscardPanel on it, because that would cause the tab control to which it belongs to be in a bad state. Likewise, you are not supposed to call SetActivePanel on a panel that is a tab page because the tab control tracks which tab page is the active one. You are supposed to set the active tab page with SetActiveTabPage or SetCtrlAttribute(ATTR_CTRL_INDEX) so that the tab control's state is correct.
The only way to know if a particular panel is part of a tab control is to itereate through all the controls of the panel looking for a tab control. Then for each tab control, iterate through all the tab pages and check if it is a tab panel. Of course, you only have to do this if the panel is a child panel (if it is not a child panel, then it can't be a tab panel).
Hope this helps.
03-14-2012 03:17 AM
This might be a good suggestion.
http://forums.ni.com/t5/LabWindows-CVI-Idea-Exchange/idb-p/cviideas
03-14-2012 03:41 AM - edited 03-14-2012 03:42 AM
Back in EasyTab days, a callback was chained to the panels added to the EasyTab control with a special identifier that you could retrieve with:
void *cbkd = NULL; GetChainedPanelCallbackData (tabPanelHandle, "Sheet Panel", &cbkd);
Since the tab control has been moved to Userint library this particular mechanism is no more available but there could be some other similar hidden/undocumented method to discriminate whether the panel is a tab page or not.
You could eventually install some meaningful callbackData to the panel once loaded and use it for this purpose.
As a last resource, you may consider returning back to EasyTab, which is still available in CVI (but I don't know whether it can be used in CVI for Linux or not).
03-14-2012 04:40 AM