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:
I'm using NetAdvantage 11.1 on a Windows 7 computer.
Any hints?
Regards, Wolfgang
Hi Chris,
thanks for your reply.
Concerning the first issue, I was already assuming that child controls inherit the font settings from the container control which is in that case the UltraTabControl. I've set the font data in the appearance of the UltraTabControl to default and that looks fine now.
Concerning the second issue, I've found out some new issues. I'm currently reworking the GUI layout of our application from a static layout of the controls (i.e. positioning them by use of Visual Studio Designer) to a flexible using the GridBagLayoutPanel. This week I reworked a more complex view of the GUI where I'm using a mainGridBagLayoutPanel to have the basic layout of various group boxes and within those group boxes I'm using child GridBagLayoutPanels to position the controls like labels, text boxes, grid views etc. Each of them are Infragistics controls. All this is part of a UserControl that is fitted into a tab page of an UltraTabControl that is part of the GUI of the application. When I start the application the part where the GridBagLayoutPanel controls are in action is terribly flickering until all controls are positioned correctly. It looks like a heavy iteration process. First I thought mayby there is something wrong with my code because I'm populating the control's content with data fetched from the database but after removing that the flickering still exists. Also when I resize the windows it looks like that is heavily 'pumping'. I did some further investigations and after I put my UserControl not on top of the UltraTabControl but somewhere else this works like a charm.
I now created an entirely new project containing a single Windows Form with nothing else on it. When I place my UserControl onto it works like a charm but if I first put an UltraTabControl onto that form with a single Tab Page, put my UserControl onto that Tab Page it's flickering and pumping again. I kept all the default settings of the UltraTabControl and also my UserControl except that I set the Dock property of both the UltraTabControl and my UserControl to fill the parent's window.
What also happens here again is that what I mentioned in my original post that the height of some controls are not correctly calculated.
Kind regards,
Wolfgang
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