Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uunet!sps!arm From: arm@sps.com (Annette Myjak) Newsgroups: comp.windows.x.motif Subject: Selection Box List Item Problem Message-ID: <264@sps.com> Date: 22 Aug 90 18:54:02 GMT Organization: SPS - Indialantic, FL Lines: 51 I am having problems with items not always appearing in the list for the selection box widget. I need to use the same selection box widget OVER and OVER and OVER -- with a different set of items most of the time. I have an array of structures which contains pointers to "name"s for each of the things in the array. I have a function that processes through this array to create an array of XmStrings of the "name"s, and a variable that keeps track of the number of things in the array. I set XmNlistItems to my array of XmStrings, and set XmNlistItemCount to my counter variable, and manage the selection box widget. Each time time I need the selection box, my application executes the functions to process the array of structures info into an array of XmStrings and sets the appropriate values for the selection box and then manages the widget. Originally, this works just fine: i have 3 things in the array and i see 3 items in my list. NOW: if i add a new thing to my original array, only the first 2 items of the array appear. if i click the mouse in the space where the 3rd item is supposed to be, wa-la, it appears. BUT the new item added to the array, (and supposedly to the item list does not appear). the next time through this process, the first 3 items appear. if i click in the space for a fourth item, the one i added (a long time ago, in a galaxy far, far away . . .) appears! The next time through the selection box, all 4 items appear. This process repeats itself each time i add a new thing to the original array. I know that the information is added into the array. I know that the counter of how many things are in the array is correct. I know that XmNlistVisibleItemCount is greater than the number of things in my list (although I don't understand why is changes from '8' to '7' the second time through after adding a new thing to the array). So why are things that are really there not there, and why are things that got added (and should be there) aren't (until some future time)? (now is everyone as confused as I am???) Any insight would be greatly appreciated. Annette Myjak arm@sps.com