home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #31 / NN_1992_31.iso / spool / alt / toolkits / xview / 1147 < prev    next >
Encoding:
Internet Message Format  |  1992-12-22  |  1.9 KB

  1. Xref: sparky alt.toolkits.xview:1147 pnw.sys.sun:17
  2. Newsgroups: alt.toolkits.xview,uw.sun,pnw.sys.sun
  3. 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
  4. From: bigac@carson.u.washington.edu (Aaron Ching)
  5. Subject: How to specify the panel items for PANEL_LIST_STRINGS, in software
  6. Message-ID: <1992Dec22.205247.5092@u.washington.edu>
  7. Sender: news@u.washington.edu (USENET News System)
  8. Organization: University of Washington, Seattle
  9. Distribution: pnw
  10. Date: Tue, 22 Dec 1992 20:52:47 GMT
  11. Lines: 35
  12.  
  13. 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:
  14. ...
  15. static char item[][20] = {"item1","item2","item3",NULL};
  16. ...
  17.     xv_set(Panel_list,
  18.         PANEL_LIST_STRINGS, item,
  19.         NULL);
  20. ...
  21. 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.
  22.     ...
  23.         PANEL_LIST_STRINGS, "item1", "item2", "item3", NULL
  24.     ...
  25. However, I have a long list of items which are read from another file during runtime.  
  26. I'm now using a for loop to put the items onto the panel list, ie.
  27.     ...     for (i=0;i<100;i++)
  28.             xv_set(Panel_list,
  29.                 PANEL_LIST_STRING, i, item[i],
  30.                 NULL);
  31.     ...
  32. The problem is: the panel list keeps flashing until all the items are added.
  33. 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?
  34.  
  35. 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?
  36.  
  37. Thanks for your attention and help, in advance.
  38.  
  39. -- Aaron Ching
  40.  
  41. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  42.    Aaron Ching -- System Analyst Programmer
  43.     Dept. of Lab Medicine
  44.     University of Washington Medical Center
  45.     aaron@lux.labmed.washington.edu
  46. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  47.  
  48.