Path: utzoo!utgpu!news-server.csri.toronto.edu!rutgers!usc!elroy.jpl.nasa.gov!thyme!kaleb From: kaleb@thyme.jpl.nasa.gov (Kaleb Keithley) Newsgroups: comp.windows.x.motif Subject: Re: Delete and rebuild items of XmList Message-ID: <1991Jan2.195756.11932@thyme.jpl.nasa.gov> Date: 2 Jan 91 19:57:56 GMT References: <1991Jan2.183113.2111@wlbr.imsd.contel.com> Distribution: usa Organization: Jet Propulsion Laboratory, Pasadena, CA Lines: 22 In article <1991Jan2.183113.2111@wlbr.imsd.contel.com> amc@wlv.imsd.contel.com (Allen M. Cohen) writes: > >What is the fastest way to delete all items in a list widget and replace them >with an entirely new set of items? (I am using Motif 1.0 under ISC unix 2.2). >Currently, I'm doing: > 1) XmListDeletePos in a loop to delete all the items. > 2) XmListAddItemUnseleted to put the new items in. > 1. Unmanage the list first. Not necessary if you do 2 and 3 below. 2. There is an undocumented function XmListDeleteAllItems(lw); well, it's undocumented in 1.1 if you still have the 1.0 docs. It may be there in 1.0. I don't know. 3. Build your own item list and set it and itemCount with XtSetValues. -- Kaleb Keithley Jet Propulsion Labs kaleb@thyme.jpl.nasa.gov Offensive quote coming soon to a .signature file near you.