home *** CD-ROM | disk | FTP | other *** search
- Xref: sparky alt.toolkits.xview:1150 pnw.sys.sun:18
- Newsgroups: alt.toolkits.xview,uw.sun,pnw.sys.sun
- Path: sparky!uunet!spool.mu.edu!umn.edu!lynx!apollo!gstilphe
- From: gstilphe@apollo.mcl.bdm.com (Gerald Stilphen)
- Subject: Re: How to specify the panel items for PANEL_LIST_STRINGS, in software
- Message-ID: <2=hrlyq@lynx.unm.edu>
- Date: Wed, 23 Dec 92 13:07:22 GMT
- Organization: BDM International, Inc.
- Sender: gstilphe@apollo (Gerald Stilphen)
- Distribution: pnw
- References: <1992Dec22.205247.5092@u.washington.edu>
- Lines: 34
-
- In article <1992Dec22.205247.5092@u.washington.edu>, bigac@carson.u.washington.edu (Aaron Ching) writes:
- >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.
-
- I don't know how to do it other than using the above loop. To control any
- flashing I usually do the following:
-
- xv_set(Panel_list, XV_SHOW, FALSE, NULL);
-
- do the list filling with your loop above.
-
- xv_set(Panel_list, XV_SHOW, TRUE, NULL);
-
- It works for me and I feel that I have a lot of items in my lists.
-
- Gerald E. Stilphen
-
-