[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference bulova::decw_jan-89_to_nov-90

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

2950.0. "Help finding cursor in SimpleText widgets" by MARX::BARLOW () Mon Jun 18 1990 16:53

    
    I have a main window that contains approx. 45 simple text widgets.
    I would like to find out where the cursor is, on the screen.
    I realize that I could use the focus callback to record what widgets
    receive focus and keep a record of the last widget to receive 
    focus.  Then when I need to, look at that variable and compare it
    with my array of widget id's to find out where it is on the screen.
    (I need to know which line it's on.)  This just seems very wastefull
    to me since, I would think, that dec windows, itself, would keep an 
    internal records of where the cursor is.
    
    Does anyone know how I could get where the cursor is ?
    
    Rachael Barlow
    
T.RTitleUserPersonal
Name
DateLines
2950.1round-trips are expensiveTOOLEY::B_WACKERTue Jun 19 1990 15:483
You could try GetInputFocus, but then you've asked for a round-trip 
and have to convert the window id returned to a widget.   It's probably 
much better to just keep track of it yourself.