LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

resizing tab controls

Solved!
Go to solution

Hi ,

is there any way to resize controls on a tab that is attached to a splitter when operating splitter (the mode "splitter sizes control" is selected).

Splitter only resizes tabs itself, not the controls on the tab. Some controls on the tab, for instance, are disappeared when splitter scale the tab down.

 

thanks for any help.

0 Kudos
Message 1 of 4
(3,100 Views)
> is there any way to resize controls on a tab that is attached to a
> splitter when operating splitter (the mode "splitter sizes control" is
> selected). Splitter only resizes tabs itself, not the controls on the
> tab. Some controls on the tab, for instance, are disappeared when
> splitter scale the tab down.   thanks for any help.

Associate a panel to that tab with GetPanelHandleFromTabPage()
Maybe that's enough for automatic resizes (which I don't use).

Otherwise:
Then give that panel a callback: SetPanelAttribute(Pnl,
ATTR_CALLBACK_FUNCTION_POINTER, cbp_Something);
Then within that function catch the EVENT_PANEL_SIZE event and do what you
want.
--
Guillaume Dargaud
http://www.gdargaud.net/
0 Kudos
Message 2 of 4
(3,095 Views)
Solution
Accepted by sahin

One way to do it would be add a hidden splitter inside the tab panel you want to resize, then attach to this splitter all the controls inside the tab that you want to also move or size. Then, when the tab is resized, as a result of moving the original splitter, you can catch this event in the tab panel's callback and respond by moving the new splitter programmatically, using the OperateSplitter function, which should result in all the attached controls sizing or moving. You can see an example of this (although not inside a tab panel) in samples\userint\docking.cws.

 

Luis

0 Kudos
Message 3 of 4
(3,081 Views)

thanks

0 Kudos
Message 4 of 4
(3,073 Views)