03-29-2012 02:27 PM
Is there a way to gray out the tab?
If I use ATTR_EASY_TAB_VISIBLE then the tab cannot be displayed at all.
I am looking to make it grayed out so that when tab is selected the controls can be seen but in grayed out mode.
Thanks.
Solved! Go to Solution.
03-29-2012 03:27 PM
I don't think so, see http://zone.ni.com/reference/en-XX/help/370051H-01/toolslib/listofeasytabattrs/
So may be this could be a good reason to upgrade to native tab controls - these do allow being dimmed (I am actually using this feature)
03-29-2012 06:49 PM
Easy tab has a dimmed attribute and so does native tab (ATTR_DIMMED).
What I can't see is a way to gray out.
In other words if the tab gets dimmed it does not even get selected.
I am hoping to select the dimmed tab and display the last values on the control.
03-29-2012 11:14 PM
@lvrat wrote:
In other words if the tab gets dimmed it does not even get selected.
Hi Ivrat,
that's my understanding of a dimmed control - it is greyed out and can not be selected. I am afraid that I do not understand how to 'grey out' any control without dimming it... Now it's me who is asking the questions
03-30-2012 01:24 AM
It appears that the easy tab attributes have changed... in CVI 2010 I found a different list than the one I have referenced, including ATTR_EASY_TAB_DIMMED.
03-30-2012 01:39 AM - edited 03-30-2012 01:41 AM
ATTR_EASY_TAB_DIMMED is present in the instrument at least from CVI7.1 on (I cannot test on earlier versions). The problem is that there is a different behaviour between the EasyTab control and native Tab control: a dimmed tab cannot be shown in the former while it shows in the native control, even though all controls cannot be operated.
After some test, I found that you can call SetPanelAttribute on a given tab page with ATTR_DIMMED attribute after the EasyTab is created: the behaviour is similar to the native control (i.d. the tab page can be selected and shown with all controls dimmed).
As a last suggestion to lvrat, since he appears to be working on a recent CVI version, I would reccommend to switch from the EasyTab to a native tab control: from the user point there is no real difference between them. On the programmer side, instead of LoadPanel (the panel with canvas)+LoadPanel (the tab panels)+EasyTab_ConvertFromCanvas+EasyTab_AddPanels (or LoadPanel+EasyTab_ConvertFromCanvas+EasyTab_LoadPanels) he will only have to load the panel and set a series of GetPanelHandleFromTabPage if he needs to save handles.
03-30-2012 04:25 PM
Thanks all for the inputs:)
Thanks Roberto, using SetPanelAttribute does work as needed.
I am actually using CVI 8.5, should have mentioned that. Nost sure if the suggestion still applies to 8.5?
03-30-2012 11:40 PM
Native tab control was introduced in CVI 8.0 so you can use it in 8.5: you should find that control in the list of available controls you see right-clicking on a empty panel.
04-02-2012 01:43 PM
Thanks Roberto, that helped.