11-24-2025 03:17 AM - edited 11-24-2025 03:23 AM
I have a table with fixed font size of 11 and font Microsoft YaHei UI. If the panel is not maximized the font looks good. If I maximize the panel, all controls incl. the table are scaled to the new size (looks sometimes weird but its ok). The font seems also be ok, but If I update the table (delete all rows and add new) the font is very tiny. I add a picture of the problem.
11-24-2025 07:19 AM
Looks like a strange effect of panel scaling during resize: you can exclude panel scaling by unchecking Scale Contents On Resize checkbox in Other Attributes... window i panel settings, or programmatically by calling SetPanelAttribute with ATTR_SCALE_CONTENTS_ON_RESIZE attribute and value 0.
11-25-2025 12:37 AM - edited 11-25-2025 12:40 AM
Thanks for your answer. Scale contents on resize is active, because I want that all controls are scaled, so I cant deactivate it. The table is ony of many controls on the panel.
The problem is rather strange somehow because If I maximize the panel the table is fine. But after updating the contents of the table the size is small.
11-25-2025 02:35 AM
An alternative approach to panel scaling could be the use of splitters to define how the panel is changed when its dimensions change. Splitter permits to choose between sizing or moving controls, giving you a more flexible approach to resizing. I personally don't like the effect of rescaling and prefer to use splitters.
You can either manually add splitters to your panel and attach controls to them in the UIR editor or you may want to take a look at the good code provided by NickB long time ago:
LabWindows/CVI Tip: Use Splitter Controls to Handle Panel Sizing