[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference bulova::decw_jan-89_to_nov-90

Title:DECWINDOWS 26-JAN-89 to 29-NOV-90
Notice:See 1639.0 for VMS V5.3 kit; 2043.0 for 5.4 IFT kit
Moderator:STAR::VATNE
Created:Mon Oct 30 1989
Last Modified:Mon Dec 31 1990
Last Successful Update:Fri Jun 06 1997
Number of topics:3726
Total number of notes:19516

2535.0. "How to get list form ListBox" by CERN::EJM () Wed Mar 28 1990 15:29

How do you get the list of items from a list box widget???

I've tried:

	DwDwtCompString item_list[10];

	XtSetArg( arglist[0], DwtNitems, item_list )
	XtGetValues( widget, arglist, 1 );

But it gives me back trash!!  Shouldn't it just fill in my array with pointers
strings????

I've also tried all sorts of char * type variables but nothing works.

The items component of a ListBox widgets is DwtCompString *items, and since 
DwtCompString is just typedefed char *, what is the problem????

	John
T.RTitleUserPersonal
Name
DateLines
2535.1How to get list form ListBoxRTL::JUNEWed Mar 28 1990 17:0911
  You don't need to allocate memory for the array, and doing so will mess 
  things up.  Try it like this:

        DwtCompString *item_list;
 
	XtSetArg( arglist[0], DwtNitems, &item_list )
	XtGetValues( widget, arglist, 1 );


							Rich