LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Dimmed tab panels

Solved!
Go to solution

Hello,

 

if I dim a numeric control, it cannot be clicked on nor can it be selected.

If I dim a menu entry, I can not see its submenus and the menu cannot be selected.

 

However, if I dim a tab panel, I can select the tab panel, so that it is displayed. Somehow this looks inconsistent to me.

 

If this is by design, is there a way to have a tab panel disabled, so it can not be shown?

 

Using CVI2012, thanks!

0 Kudos
Message 1 of 6
(3,994 Views)

It does not seem inconsistent to me: a dimmed control or menu entry can actually be seen, even though it is not operable (that's why you cannot see submenus): the same happens with dimmed tab panels. 

In case you want that a tab panel is not shown you can use SetTabPageAttribute (, , , ATTR_VISIBLE, 0);



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 2 of 6
(3,984 Views)

Hi Roberto,

 

Thanks for your comment and sorry for being sloppy: I want to see the panel tab, dimmed, but I don't want the user to be able to select it, so the user should not be able to see the tab panel contents (tab being analogous to a menu, the panel to the submenues...)

0 Kudos
Message 3 of 6
(3,980 Views)

I'm not aware of a built-in functionality that permits this behaviour. I suppose you could set a callback for the tab controls and handle EVENT_ACTIVE_TAB_CHANGE: I don't know if this event can be swallowed, but you can test it easily; in case it's not you can return to the previous active panel, which is received as eventData1 parameter.



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 4 of 6
(3,972 Views)
Solution
Accepted by topic author Wolfgang

The current behavior is by design. The thinking is that even though a tab page is dimmed, you still might want to know what all is on that tab page.

 

You can use the callback to make a tab control behave the way you want it, but it does take a bit of programming. Here is an example of how to do it.

 

Hope this helps.

Message 5 of 6
(3,956 Views)

Thank you all!

0 Kudos
Message 6 of 6
(3,951 Views)