LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

dynamic button inscription ??

Is it possible to assign a button a dynamic inscription?

I want to assign the active list item "char" to the inscription on the button.
If the active list item change, the inscription on the button also has to change.

Is there a function or something else?

THX for answering.
Greber
0 Kudos
Message 1 of 5
(3,237 Views)
You can use SetCtrlAttribute to change ATTR_LABEL_TEXT on the button.
For example,
SetCtrlAttribute (panelHandle, PANEL_COMMANDBUTTON, ATTR_LABEL_TEXT,
newText);

If you're getting the text from a listbox, create a callback for the listbox with a case for EVENT_VAL_CHANGED. In that case,
call GetCtrlIndex to find the active item
call GetLabelFromIndex to get the text
call SetCtrlAttribute to label the button with the text.
Message 2 of 5
(3,232 Views)
Hay again,
the function is very good and makes all I need, but...

Now I designed a bigger progam, which will be used international.

On the userinterface should appear the language the user select first in a popup or something else.
Do I have to program all the buttons,... with this function in all the possible languages, maybe with some different default values?

Or is there an other possible way?

thanks a lot
Florian
0 Kudos
Message 3 of 5
(3,187 Views)
This tutorial is a good place to start looking at localizing CVI applications.

Hope this helps
Bilal Durrani
NI
0 Kudos
Message 4 of 5
(3,179 Views)
thanks, that is exactly what I need.
0 Kudos
Message 5 of 5
(3,172 Views)