LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

how can I obtain the usable height of a tab panel?

Solved!
Go to solution

Hi,

 

I've designed a tab page. In the UI editor I can set the height of the panel including the tab (tabs are on top). How much vertical space is left for the usable panel tab, i.e. excluding the tab - phrased differently, how high is the tab? In the UI editor I can play with tabs on top and tabs left for estimating the panel height, but can it be determined (a) in a more professional way and (b) programmatically?

 

Thanks!

0 Kudos
Message 1 of 4
(4,111 Views)

Not exactly a good aswer this one, but... tab height is related to the font size used for the tab with the grater font of all. In particular, tab height is 2 pixels less than the height of a button control with the same font (3 pixels if not using Windows theme for controls).



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

Wolfgang,

 

You can always get the tab panel handle programmatically, using GetPanelHandleFromTabPage, and then call GetPanelAttribute(...,ATR_HEIGHT,...). Then, you can subtract that value from the height of the tab control.

 

You might also have to subtract a couple of pixels for the panel frame, depending on what you'll be using the tab height for.

 

Luis

Message 3 of 4
(4,093 Views)

Roberto and Luis,

 

thanks for both answers!

 

@Roberto: it wasn't that bad Smiley Wink Actually because it is easily possibly to determine the height of a button control in the UI editor knowing this equivalence is valuable to know!

0 Kudos
Message 4 of 4
(4,075 Views)