| Title: | DECWINDOWS 26-JAN-89 to 29-NOV-90 | 
| Notice: | See 1639.0 for VMS V5.3 kit; 2043.0 for 5.4 IFT kit | 
| Moderator: | STAR::VATNE | 
| Created: | Mon Oct 30 1989 | 
| Last Modified: | Mon Dec 31 1990 | 
| Last Successful Update: | Fri Jun 06 1997 | 
| Number of topics: | 3726 | 
| Total number of notes: | 19516 | 
  Hi,
  I have a question about the simple_text widget.  I want to be able
  to have a user select part of the simple text widget in order to replace
  it with different text.  To do this I need to know the start and end positions
  of the selected area within the simple text string.  Is there any 
  way to get this information?
    
    						+adam
| T.R | Title | User | Personal Name | Date | Lines | 
|---|---|---|---|---|---|
| 1862.1 | DwtTextGetSelectionPosition() | TALLIS::ZANZERKIA | Fri Dec 08 1989 10:02 | 10 | |
|     Use DwtTextGetSelectionPosition()
    
    int from,to;
    
    DwtTextGetSelectionPosition(widget, &from, &to);
    
    "from","to" are character positions relative to the text buffer
    beginning.
    
    Robert
 | |||||
| 1862.2 | That's it! | MARX::ELKINS | the Hope flakes stay crispy in milk | Fri Dec 08 1989 15:27 | 10 | 
|     RE:  -.1
    
    Thanks Robert.  That's just what I was looking for!
    I wonder why the DwtTextGetSelectionPosition function
    isn't documented in the Ultrix DECwindows documentation.
    ???
    
    Thanks again,
    
    					+adam 
 | |||||
| 1862.3 | KOBAL::SCAER | Fri Dec 08 1989 17:59 | 6 | ||
| > I wonder why the DwtTextGetSelectionPosition function > isn't documented in the Ultrix DECwindows documentation. DwtTextGetSelectionPosition is unsupported. | |||||