LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Modification attributes by code

Hi everybody,
I'd like to know how can I modify the size, the font, text color...of a
control by code.

Thank you for yours answers.
0 Kudos
Message 1 of 2
(2,935 Views)
Hi,

Try the "SetCtrlAttribute" function.

Something like this:

SetCtrlAttribute (panelHandle, PANEL_CONTROL, (the attribute you want to change), (its value -depends of the attribute) );

Type "SetCtrlAttribute". Position your cursor on it. Make a "Ctrl+P". A function panel will popup. Click on "Control Attribute", another popup panel will appear. You will find everything you need there. Control and text options. Choose your Attribute Constant, by double clicking on it. For example for the size of the control, you will have something like this:

SetCtrlAttribute (panelHandle, PANEL_CONTROL, ATTR_WIDTH, 150); //ctrl width = 150 pixels

and so on for evrythinfg you want to do...

bye, flo.
0 Kudos
Message 2 of 2
(2,935 Views)