LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I modify attributes to radio buttons and ring controls?

I am currently trying to modify some ring controls and radio buttons in a GUI in order to introduce the use of touch screen monitors. Consequently, I am resizing several graphic areas within a couple of uir files. What I am finding difficult to do though, is to resize the ring control and some radio buttons for the up/down arrows without blowing all of the text off of the screen.
0 Kudos
Message 1 of 5
(3,850 Views)
I'm not really sure what you mean by "resizing several graphic areas", but what you can do is set a couple of particular attributes for your panel that allow it to scale uniformly. These attributes are the ATTR_SCALE_CONTENTS_ON_RESIZE and ATTR_RESOLUTION_ADJUSTMENT.

The "Scale contents on resize" attribute of a panel when set to true will cause all of the contents of a panel to uniformly scale when you or the end user resize the panel (by dragging a corner of the panel or programmatically controlling the size).

The "Resolution Adjustment" attribute of a panel specifies whether the panel and its contents are scaled when displayed on screens with different resolutions.

The one thing to remember though is that you have to be realistic when expecting certain things
to scale properly, like how your text will be displayed when using certain fonts and whether or not captions on buttons will be displayed properly when they are shrunk to small.

To get more information about these panel attributes that I have mentioned you should either look at the User Interface Reference manual or the CVI online help under the User Interface Library >> Panels heading.

Jason F.
Applications Engineer
National Instruments
www.ni.com/ask
0 Kudos
Message 2 of 5
(3,850 Views)
Jason:

I should have been more specific. Pardon me for my unfamiliarity with CVI terminology. However, I am working on a GUI that uses a variety of items in the UIR file. When a UIR file is loaded, the Create menu permits the programmer to add items to the GUI. The Command Button, when placed on the display, permits me to resize in both directions. However, the List Box and Ring Control items, when placed in the display, only permit resizing in the horizontal direction. The vertical resizing is only accessable through the Text Style attribute setting. When the Text Style size is changed all of the text inside the box increases. My aim or purpose in resizing was only to increase the physical size of the up/down arrows.

As I am introducing touch screen m
onitors, I do not see an immediate benefit using the commands you suggested since I am not trying to uniformly resize the entire screen. In fact, I only want the areas of the GUI increased in size so that the user can press/click the area with their finger-tip instead of using a mouse.

Also, I have tried resizing the ScrollBar width under Windows/Settings/Control Panel/Display/Appearance/Item but these changes do not seem to track through into CVI.

Any further suggestions?

Farside
0 Kudos
Message 3 of 5
(3,850 Views)
Thanks for explaining your situation better.

You're correct, the list box and ring controls only resize vertically to store the size of font, and I'm afraid there really is no solution to only increase the up/down arrow size. It is just the way those controls were designed.

As for the scroll bars not resizing, all applications do not inherit by default the properties of the operating system. Our IDE itself and the scrollbars used inside of UIRs exhibit this non-inheritance, and we have not exposed a way to change all of them. However, the scrollbar custom control (the instrument driver for creating one is in the C:\MeasurementStudio\cvi\toolslib\custctrl directory, an example on how to use it is in the C:\MeasurementStudio\cvi\samples\userint\cu
stctrl\scrollbar directory) does allow you to set its size when you create it, so this may be a possibility for you.

I hope this information has helped and good luck!

Jason F.
Applications Engineer
National Instruments
www.ni.com/ask
0 Kudos
Message 4 of 5
(3,850 Views)
If a list box displays 2 or 3 lines, the scroll arrow size is pretty small (depending on your screen resolution). If you increase the number of visible lines to 4 or greater, the arrows grow (to an extent). You can control the number of visible lines by setting an attribute.

SetCtrlAttribute (panelHandle, PANEL_LISTBOX, ATTR_VISIBLE_LINES, numLines);
0 Kudos
Message 5 of 5
(3,850 Views)