Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
1878
Layout problems
posted

I've a GUI where I'm using a Splitter Control that contains an UltraGrid on the upper panel. Upon selection of a row details for the selected row are displayed in the lower panel of the Splitter control. Since a lot of data has to be shown I'm using an UltraTabControl to logically group the data.

I realized two strange layout problems when using UserControls on the UltraTabControl:

  1. The controls of the UserControl do change their size if they are on a tabpage of the UltraTabControl so e.g. UItraGrid controls are getting bigger. I've found out that it something to do with the font set for the UltraTabControl so if I'm using the default font this doesn't happen.
  2. I'm using UltraGridLayoutPanel to position the controls on a UserControl whereas there are beneath other controls 2 UltraLabel and 2 UltraTextEditor controls in one row (label - editor -, label - editor). If I'm using that UserControl outside of the UltraTabControl it is drawn perfectly fine. If it is positioned on an UltraTabControl the second UltraTextEditor has a different height of some pixels.

I'm using NetAdvantage 11.1 on a Windows 7 computer.

Any hints?

Regards, Wolfgang

Parents
  • 6158
    Suggested Answer
    Offline posted

    Hello Wolfgang,

    Similar to other containers in .NET, setting the Font property (inherited from Control) on the UltraTabControl will affect the font of any child control who have not had their font specifically set. By default, the AutoScaleMode of a Form and UserControl is set to Font. As such, the size of the controls will be scaled based on the font assigned to the UltraTabControl's Font property. I'm assuming you are simply looking to change the font used to render the tabs, not all the contents of each tab. In this case, you should be changing the relative font information in the UltraTabControl's Appearance.FontData property.

    In regards to your second issue, this may also be related to changing the Font on the UltraTabControl. If you are still encountering the issue after changing to use the Appearance.FontData, please let me know with any additional information you can provide about the setup.

    Thanks,

    Chris

Reply Children
No Data