12-08-2009 06:33 PM
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
12-09-2009 08:55 AM
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
12-09-2009 10:27 AM
Hello Nick,
That explains it all.
I read Roberto Bozzolo's post too.
Great answer!
Alex