LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

How to get a control ID

How Can I get control ID without writing codes?  Is there any menu/toolbar that support this??
0 Kudos
Message 1 of 2
(3,833 Views)

What are you looking for? Simply knowing the control ID or addressing controls by ID order instead of the associated name?

The IDs are macros created by the UIR editor while developing the UIR and are stored in the .H file associated to your UIR: you can explicitly open it in an editor window or select View >> Previev User Interface Header File while in the UIR editor. You'll find a couple of

#define  PANEL                        3

#define  PANEL_COMMANDBUTTON          28

which are the macros for panels and controls and corresponding IDs.

But I personally discourage you in addressing controls by their IDs instead of the associated name: this theme has been discussed some times in this forum and you can make a search on it, but basically, consider that every time you add/remove controls in a panel or rearrange their z-plane order the IDs associated to the controls are automatically changed and your code should be rearranged accordingly.



Proud to use LW/CVI from 3.1 on.

My contributions to the Developer Community
________________________________________
If I have helped you, why not giving me a kudos?
0 Kudos
Message 2 of 2
(3,818 Views)