home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #16 / NN_1992_16.iso / spool / comp / windows / openloo / 3243 < prev    next >
Encoding:
Internet Message Format  |  1992-07-27  |  1.2 KB

  1. Path: sparky!uunet!dtix!darwin.sura.net!jvnc.net!yale.edu!yale!gumby!destroyer!caen!umeecs!umn.edu!csus.edu!csusac!unify!openlook!openlook-request
  2. From: fgreco@fis1026.shearson.com (Frank Greco)
  3. Newsgroups: comp.windows.open-look
  4. Subject: Re: Scrolling lists
  5. Message-ID: <b82fl5s@openlook.Unify.Com>
  6. Date: 27 Jul 92 22:23:20 GMT
  7. Sender: news@Unify.Com
  8. Lines: 26
  9.  
  10. > My question has to do with scrolling lists.  After I display
  11. > a list that is longer than the window can hold and scroll all
  12. > the way down to see the bottom of the list, if I try to display
  13. > a new list with fewer rows than the window can hold, none of the
  14. > rows in the new list gets displayed.  I must scroll back up to see
  15. > those rows.  Here is what I am doing:
  16.  
  17. Try:
  18.     xv_set((Scrollbar)xv_get(your-panel-list, PANEL_LIST_SCROLLBAR),
  19.         SCROLLBAR_VIEW_START, 0,
  20.         NULL);
  21.  
  22. .its probably better to write a little wrapper around the above for
  23. portability:
  24.  
  25. int SetListSB(list, item_num)
  26. Panel_list list;    /* Your list */
  27. int item_num;        /* Index of the "first" viewable row in your list */
  28. {
  29.     return xv_set((Scrollbar)xv_get(list, PANEL_LIST_SCROLLBAR),
  30.         SCROLLBAR_VIEW_START, item_num,
  31.         NULL);
  32. }
  33.  
  34. Frank G.
  35. =-=-=-=-=-=-=-=-=-=
  36.