LabWindows/CVI

annulla
Visualizzazione dei risultati per 
Cerca invece 
Intendevi dire: 

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
Messaggio 1 di 2
3.094Visualizzazioni
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
Messaggio 2 di 2
3.094Visualizzazioni