home *** CD-ROM | disk | FTP | other *** search
- Xref: sparky alt.toolkits.xview:1147 pnw.sys.sun:17
- Newsgroups: alt.toolkits.xview,uw.sun,pnw.sys.sun
- Path: sparky!uunet!elroy.jpl.nasa.gov!sdd.hp.com!spool.mu.edu!uwm.edu!rpi!usenet.coe.montana.edu!news.u.washington.edu!carson.u.washington.edu!bigac
- From: bigac@carson.u.washington.edu (Aaron Ching)
- Subject: How to specify the panel items for PANEL_LIST_STRINGS, in software
- Message-ID: <1992Dec22.205247.5092@u.washington.edu>
- Sender: news@u.washington.edu (USENET News System)
- Organization: University of Washington, Seattle
- Distribution: pnw
- Date: Tue, 22 Dec 1992 20:52:47 GMT
- Lines: 35
-
- I'm trying to declare a data type which can be used to specify the panel items for the PANEL_LIST_STRINGS in Xview. I've tried the following:
- ...
- static char item[][20] = {"item1","item2","item3",NULL};
- ...
- xv_set(Panel_list,
- PANEL_LIST_STRINGS, item,
- NULL);
- ...
- This will display the "item1" only, because of the "\0" after the string. I know I can put the items into the xv_set function, ie.
- ...
- PANEL_LIST_STRINGS, "item1", "item2", "item3", NULL
- ...
- However, I have a long list of items which are read from another file during runtime.
- I'm now using a for loop to put the items onto the panel list, ie.
- ... for (i=0;i<100;i++)
- xv_set(Panel_list,
- PANEL_LIST_STRING, i, item[i],
- NULL);
- ...
- The problem is: the panel list keeps flashing until all the items are added.
- My question is: can I declare a variable so that I can specify all the items at one time without the use of for loop?
-
- Someone has just suggested me to use Attr_avlist. But the question still remains: How can I specify the panel items in run-time w/o the for loop?
-
- Thanks for your attention and help, in advance.
-
- -- Aaron Ching
-
- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
- Aaron Ching -- System Analyst Programmer
- Dept. of Lab Medicine
- University of Washington Medical Center
- aaron@lux.labmed.washington.edu
- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
-