10-21-2010 08:57 AM
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!
Solved! Go to Solution.
10-21-2010 09:55 AM - edited 10-21-2010 09:56 AM
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).
10-21-2010 02:02 PM
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
10-22-2010 01:00 AM - edited 10-22-2010 01:03 AM
Roberto and Luis,
thanks for both answers!
@Roberto: it wasn't that bad 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!