LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

correct way to add controls to tabs

Hi,

i had the idea of using tabs with 1 graph control on each tab

instead of using 1 graph control and always deleting

the last plot before plotting a new one.

 

I created a tab in the panel and  by right clicking on each tab i added one  graph control on each tab.

The problem is , that in the uir-header file,

there are duplicate defines for the graph control and existing controls on the panel.

 

 

No control on the tab was created by copy and paste !!

 

See some lines of the header file below

 

 

#define  PANEL_MESS                                  1
#define  PANEL_MESS_BUTTON_DRIFT          2       /* control type: command, callback function: (none) */
#define  PANEL_MESS_BUTTON_OFF_HIGH    3       /* control type: command, callback function: (none) */
#define  PANEL_MESS_BUTTON_OFF_LOW    4       /* control type: command, callback function: (none) */
#define  PANEL_MESS_BUTTON_FUNC           5       /* control type: command, callback function: (none) */
#define  PANEL_MESS_PROGRESSBAR          6       /* control type: scale, callback function: (none) */
#define  PANEL_MESS_BUTTON_SAVE           7       /* control type: command, callback function: (none) */
#define  PANEL_MESS_INDEX                         8       /* control type: numeric, callback function: (none) */
#define  PANEL_MESS_YREADOUT               9       /* control type: numeric, callback function: (none) */
#define  PANEL_MESS_DECORATION            10      /* control type: deco, callback function: (none) */
#define  PANEL_MESS_FUNCTIONS             11      /* control type: textMsg, callback function: (none) */
#define  PANEL_MESS_MARKER                12      /* control type: textMsg, callback function: (none) */
#define  PANEL_MESS_DECORATION_2       13      /* control type: deco, callback function: (none) */
#define  PANEL_MESS_TAB                        14      /* control type: tab, callback function: (none) */
#define  PANEL_MESS_BUTTON_QUIT         5      /* control type: command, callback function: QUIT */

     /* tab page panel controls */
#define  DRIFT_GRAPH                               2       /* control type: graph, callback function: (none) */

     /* tab page panel controls */
#define  FUNC_GRAPH                              2       /* control type: graph, callback function: (none) */

     /* tab page panel controls */
#define  OFF_HIGH_GRAPH                        2       /* control type: graph, callback function: (none) */

     /* tab page panel controls */
#define  OFF_LOW_GRAPH                        2       /* control type: graph, callback function: (none) */

 

Any idea ?

0 Kudos
Message 1 of 2
(2,999 Views)

There is nothing wrong... at first glance it may be confusing but remember that with tabs you also have different panel handles, and only the combination of panel and control_id needs to be unique...

0 Kudos
Message 2 of 2
(2,996 Views)