home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #1 / NN_1993_1.iso / spool / comp / windows / x / motif / 8357 < prev    next >
Encoding:
Internet Message Format  |  1993-01-06  |  1.3 KB

  1. Path: sparky!uunet!dtix!darwin.sura.net!gatech!usenet.ins.cwru.edu!agate!ucbvax!iis.UUCP!glen
  2. From: glen@iis.UUCP
  3. Newsgroups: comp.windows.x.motif
  4. Subject: Re: Help: Text in Scrolled Window
  5. Message-ID: <9301052345.AA24802@rigel>
  6. Date: 5 Jan 93 23:45:16 GMT
  7. Sender: daemon@ucbvax.BERKELEY.EDU
  8. Distribution: inet
  9. Organization: The Internet
  10. Lines: 24
  11.  
  12.  
  13. >     I have a Text widget in a Scrolled Window widget, which is configured to
  14. > scroll vertically automatically (and thus is not simply a ScrolledText widget).
  15. > This widget is used for output only, with messages being periodically appended
  16. > to the end of the text.  I would like the scrolled window to constantly show the
  17. > position of the current end of the text, but cannot find any way of doing it
  18. > without changing the operation of the Scrolled Window to manual (which would make
  19. > a lot more work).
  20. >     Any ideas would be greatly appreciated,
  21. >         Jeffrey Wood
  22.  
  23. The following works for me:
  24.  
  25.         XmTextInsert (mensDataLCD, mensDataPos, messageBuf);
  26.     mensDataPos = XmTextGetLastPosition (mensDataLCD);
  27.         XtVaSetValues (mensDataLCD,
  28.                        XmNcursorPosition, mensDataPos,
  29.                        NULL);
  30.         XmTextShowPosition (mensDataLCD,
  31.                             mensDataPos);
  32.  
  33. Good Luck !
  34.