LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

which child panel is selected

Parent panel has two child panels. I can select one of the child panels by clicking on the menu bar of the child panels.

How can I know which child panel is selected at any moment in my program. I tried ATTRIB_ACTIVE & ATTRIB_DIMMED already.

Thanks a bunch for your help,
Kiran.
0 Kudos
Message 1 of 4
(3,293 Views)
Try SetActivePanel(panelHandle);


Kiran wrote in message news:<5065000000080000000EEE0000-1079395200000@exchange.ni.com>...
> Parent panel has two child panels. I can select one of the child
> panels by clicking on the menu bar of the child panels.
>
> How can I know which child panel is selected at any moment in my
> program. I tried ATTRIB_ACTIVE & ATTRIB_DIMMED already.
>
> Thanks a bunch for your help,
> Kiran.
0 Kudos
Message 2 of 4
(3,293 Views)
You can try using GetActivePanel, which returns the panel handle of the active panel (panel currently receiving keyboard events). Also, as posted before, if you want to programmatically have a panel selected, use SetActivePanel, and pass it the panel handle of the panel you want.

Jeremy L.
National Instruments
Jeremy L.
National Instruments
0 Kudos
Message 3 of 4
(3,293 Views)
> Parent panel has two child panels. I can select one of the child
> panels by clicking on the menu bar of the child panels.
>
> How can I know which child panel is selected at any moment in my
> program. I tried ATTRIB_ACTIVE & ATTRIB_DIMMED already.

Use GetPanelAttribute (, ATTR_ACTIVE, ) on each to see which one is active, or put a callback in
them to catch the EVENT_GOT_FOCUS event.
--
Guillaume Dargaud
http://www.gdargaud.net/
"I went to a bookstore and asked the saleswoman, "Where's the self-help section ?"
She said if she told me, it would defeat the purpose."
0 Kudos
Message 4 of 4
(3,293 Views)