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

  1. Xref: sparky alt.toolkits.xview:1150 pnw.sys.sun:18
  2. Newsgroups: alt.toolkits.xview,uw.sun,pnw.sys.sun
  3. Path: sparky!uunet!spool.mu.edu!umn.edu!lynx!apollo!gstilphe
  4. From: gstilphe@apollo.mcl.bdm.com (Gerald Stilphen)
  5. Subject: Re: How to specify the panel items for PANEL_LIST_STRINGS, in software
  6. Message-ID: <2=hrlyq@lynx.unm.edu>
  7. Date: Wed, 23 Dec 92 13:07:22 GMT
  8. Organization: BDM International, Inc.
  9. Sender: gstilphe@apollo (Gerald Stilphen)
  10. Distribution: pnw
  11. References:  <1992Dec22.205247.5092@u.washington.edu>
  12. Lines: 34
  13.  
  14. In article <1992Dec22.205247.5092@u.washington.edu>, bigac@carson.u.washington.edu (Aaron Ching) writes:
  15. >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:
  16. >...
  17. >static char item[][20] = {"item1","item2","item3",NULL};
  18. >...
  19. >    xv_set(Panel_list,
  20. >        PANEL_LIST_STRINGS, item,
  21. >        NULL);
  22. >...
  23. >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.
  24. >    ...
  25. >        PANEL_LIST_STRINGS, "item1", "item2", "item3", NULL
  26. >    ...
  27. >However, I have a long list of items which are read from another file during runtime.  
  28. >I'm now using a for loop to put the items onto the panel list, ie.
  29. >    ...     for (i=0;i<100;i++)
  30. >            xv_set(Panel_list,
  31. >                PANEL_LIST_STRING, i, item[i],
  32. >                NULL);
  33. >The problem is: the panel list keeps flashing until all the items are added.
  34.  
  35. I don't know how to do it other than using the above loop.  To control any
  36. flashing I usually do the following:
  37.  
  38.     xv_set(Panel_list, XV_SHOW, FALSE, NULL);
  39.  
  40.     do the list filling with your loop above.
  41.  
  42.     xv_set(Panel_list, XV_SHOW, TRUE, NULL);
  43.  
  44. It works for me and I feel that I have a lot of items in my lists.
  45.  
  46. Gerald E. Stilphen
  47.  
  48.