09-02-2008 01:59 PM
I am using a strip chart control on a panel that has the ATTR_SCALE_CONTENTS_ON_RESIZE attribute set true.
When the panel is resized the axis labels will often resize in a way that makes them unreadable. If the resize operation is repeated to another size and then back to the original size, the axis labels will sometimes be ok and other times not. In other words the axis labels seem to be resized randomly in relation to the rest of the panel.
I am using LabWindows/CVI version 8.5.1.
Does anyone know how I can correct this problem.
09-03-2008 02:57 PM
Hello 2diamondfan,
Thank you for posting on the NI Discussion Forums. The attribute that you mentioned is not an attribute available of controls, but instead available of panels. When the attribute is set to true, everything in the panel is automatically resized when the panel itself is resized (controls, text, etc.). Unfortunately there are no additional attributes which we can set to control exactly how the individual elements in the panel are resized (i.e. keep text a readable size).
One thing you can do is set the minimum and maximum values that the panel can be resized to (ATTR_MIN_HEIGHT_FOR_SCALING and ATTR_MIN_WIDTH_FOR_SCALING) so that the minimum size still contains readable text on the axis labels. Another option would be to reset the text size of the legend attribute to a readable size if it becomes set too low. You could use the EVENT_PANEL_SIZE as the event for a callback function of the panel to query the size of the text and determine whether or not it is large enough, and resize it if needed.