We have an UltraTabbedMdi with 3 TabGroups with orientation = Horizontal. We want to be able to set the Height and Width of the tab area (not the tab itself, the whole form) of the TabGroups in code. Is this possible?
Hello Mark,
What you can do to enlarge the size of tab area is to set some margins to it. To do so you need to set TabAreaMargins of TabGroupSettings like this:
var tabGroupSettings = this.ultraTabbedMdiManager1.TabGroupSettings;
// Set tab area margins to add some space between tab area border// and tabsvar tabAreaMargins = tabGroupSettings.TabAreaMargins;tabAreaMargins.Top = 20;tabAreaMargins.Left = 20;tabAreaMargins.Right = 20;tabAreaMargins.Bottom = 20;
Please note that under the tabs we are drawing a line and some padding by default. We achieve this by drawing two UIElements - TabLineUIElement for the line and TabClientAreaEdgeUIElement for the padding. Right now there is now build in property or method to set the appearance of these elements. If you need some space under the tabs you need to force these elements to stop draw themselves. You can achieve this by implementing DrawFilter. In the attached sample project I have implement this approach for you.
Please check my sample and let me know if this is what you are looking for or if I am missing something.
Milko,
Thanks for your prompt attention to our issue, but perhaps we didn't phrase the question well. We're asking about adjusting the Height of TabGroups, in code. We modified your sample code to create a scenario like ours, and have attached the modified project in a new zip file. Also in the zip file are pictures of what the new sample code form looks like before and after manual TabGroup Height adjustments. As the After picture shows, users can manually adjust the Height of the three TabGroups so they are equal. We want to learn how to do the same adjustment in code.
Mark
Hi Mark,
Thank you for your feedback and sample provided.
Yes, you can set the height of each group run time. What you need is to set the Extent property of each group. If what you need is all the groups to have the same height, you can set Extent of all the groups to same value. Please note, if the sum of groups’ extents does not match the MDI client are the height of each group is recalculated proportionally. This way you even do not need to calculate the exact height you need – only set same value for each group.
Please check the attached sample where I have implemented this for you and let me know if you need any further assistance.
Thanks, Milko. That did what we needed.