LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

EasyTab attribute

Solved!
Go to solution

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.

*************************************************
CLD
*************************************************
0 Kudos
Message 1 of 9
(3,337 Views)

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)

0 Kudos
Message 2 of 9
(3,335 Views)

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.

*************************************************
CLD
*************************************************
0 Kudos
Message 3 of 9
(3,329 Views)

@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 Smiley Wink 

 

 

 

0 Kudos
Message 4 of 9
(3,327 Views)

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.

0 Kudos
Message 5 of 9
(3,323 Views)
Solution
Accepted by lvrat

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.



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 6 of 9
(3,320 Views)

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?

*************************************************
CLD
*************************************************
0 Kudos
Message 7 of 9
(3,302 Views)

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.



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?
0 Kudos
Message 8 of 9
(3,295 Views)

Thanks Roberto, that helped.

*************************************************
CLD
*************************************************
0 Kudos
Message 9 of 9
(3,270 Views)