Xref: utzoo comp.windows.news:2231 comp.windows.x:23638 Path: utzoo!utgpu!watserv1!watmath!att!tut.cis.ohio-state.edu!ucbvax!ucsfcgl!dufy.mmwb.ucsf.edu!kneller From: kneller@dufy.mmwb.ucsf.edu (Don Kneller) Newsgroups: comp.windows.news,comp.windows.x Subject: scrolling lists in XView - a file dialog Keywords: scrolling list, XView, X Message-ID: <14447@cgl.ucsf.EDU> Date: 27 Jun 90 01:21:20 GMT Sender: daemon@cgl.ucsf.edu Distribution: na Lines: 47 Here seems like an easy project: Create a file open dialog that shows the contents of the current directory and allows selection of a file or directory. If a directory is chosen, show the contents of that directory. If a file is chosen, make it the selected file. I'm trying to use the XView Scrolling List (aka PANEL_LIST panel item) as documented in section 7.9 of the XView programming manual. I'm having the following problems with setting the elements in the list: 1) using xv_set, it is possible to either set a fixed number of strings for the list, or set an indexed string for the list. What I need is a variable number of strings. Something like **argv would have done the trick. To get a variable number of strings, it is necessary to insert one entry for each string. This is painfully slow and causes unnecessary flashing on the screen. Moreover, it is not possible to start with an empty list of entries --- there must be at least one or PANEL_LIST_INSERT dumps core. xv_set(thing, PANEL_LIST_STRINGS, "", (char *) NULL, 0); xv_set(thing, PANEL_LIST_INSERT, i PANEL_LIST_STRING, i, newvalue, 0); 2) to change the entries, it is not possible to change all of them at once. I would have hoped something like: xv_set(thing, PANEL_LIST_STRINGS, (char *) NULL, 0); would have done the trick. Instead it is necessary to delete them one at a time: xv_set(thing, PANEL_DELETE_STRING, i, 0); Again, painfully slow and causes unnecessary screen updates. Surely (you don't mind if I call you "Shirley?") this has been done before. Any help would be appreciated. - don