LabWindows/CVI User Group Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

UIR Listbox control issues

Hi All,

I've encounered a problem programmatically writing items in to a listbox.

It seems like when a listbox control is on a UIR there is no problem addressing it as: status = InsertListItem (panelHandle, PANEL_LISTBOX, -1, "TEST1", 0);

But when I add a tab control and put a list box on one of the tabs, then

status = InsertListItem (panelHandle, PANEL_TAB_LISTBOX, -1, "TEST1", 0); doesn't work, OR

status = InsertListItem (panelHandle, TAB_LISTBOX, -1, "TEST1", 0); doesn't work either.

What am I doing wrong?

Thanks,

Alex

ALH
0 Kudos
Message 1 of 3
(6,719 Views)

Hey Alex,

When using the tab control, you must get a new panel handle for each tab page using the function GetPanelHandleFromTabPage.  Check out Roberto Bozzolo's post on this forum post for more information.

NickB

National Instruments

0 Kudos
Message 2 of 3
(3,480 Views)

Hello Nick,

That explains it all.

I read Roberto Bozzolo's post too.

Great answer!

Alex

ALH
0 Kudos
Message 3 of 3
(3,480 Views)