简体   繁体   中英

How to control GUI from labview?

I have a requirement where I have to edit the settings of the GUI. Suppose if I will open a notepad now I need to change the setting by labview . eg changing the font . How can i do it? Please help me. 在此处输入图片说明

http://zone.ni.com/reference/en-XX/help/371361H-01/lvconcepts/creating_configuration_files/

One way to do it would be with a config file, property nodes associated with the front panel items you want to edit, and a button to activate a new event case. This is assuming your GUI or main VI already has a working event structure (I don't know any other way to have a GUI w/o an event structure).

In the event case, you would have it read the config file, return the keys, and based on the key value, change the value of a property node. If you know your property node takes some number value or a string, then you could directly wire the key value to the property node. Alternatively, you can send your keys as the input to a case structure. Then in your case structure, hardcode the options you want to send to your property node.

For example, to change the font (see http://digital.ni.com/public.nsf/allkb/6BD344ACA4DEE20A8625692700737E16 ), you can directly wire the output of the Read Key.vi to the Text.FontName input of the property node.

Then you can use notepad to edit your GUI settings "on the fly".

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM