Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [platform-swt-dev] FocusGained, but in which direction


Guys, enter a bugzilla report.  Randy has a legitimate problem because he
is trying to do the lightweight thing (silly guy <g>).  I'm not quite sure what we
can do about it because the focus callback comes from the OS and doesn't
have a field that we can set to indicate where the focus came from.

Randy, you could save and restore your last lightweight widget that had focus
and set focus to be that thing whenever you get focus.  It wouldn't quite be right
but it might be something.

Question:  Why are you mixing your lightweights with SWT widgets anyways?


Steve



"Randy Hudson" <hudsonr@xxxxxxxxxx>
Sent by: platform-swt-dev-admin@xxxxxxxxxxx

04/08/02 04:11 PM
Please respond to platform-swt-dev

       
        To:        platform-swt-dev@xxxxxxxxxxx
        cc:        
        Subject:        Re: [platform-swt-dev] FocusGained, but in which direction


I didn't say it always makes sense.  I just need to know about the times
when it does make sense, and it can be undefined during other cases, much
like the "button" field on MouseEvent.

I am trying to implement accessibility, which is why I need to know the
direction.



|---------+---------------------------------->
|         |           Veronika_Irvine@xxxxxxx|
|         |           Sent by:               |
|         |           platform-swt-dev-admin@|
|         |           eclipse.org            |
|         |                                  |
|         |                                  |
|         |           04/08/2002 03:48 PM    |
|         |           Please respond to      |
|         |           platform-swt-dev       |
|         |                                  |
|---------+---------------------------------->
 >-------------------------------------------------------------------------------------------------------------------|
 |                                                                                                                   |
 |       To:       platform-swt-dev@xxxxxxxxxxx                                                                      |
 |       cc:                                                                                                         |
 |       Subject:  Re: [platform-swt-dev] FocusGained, but in which direction                                        |
 |                                                                                                                   |
 |                                                                                                                   |
 >-------------------------------------------------------------------------------------------------------------------|




The traverse event tells you which direction the traversal is going to be
(event.detail == SWT.TRAVERSE_TAB_NEXT etc).  The focus event does not have
direction because direction does not always make sense - what if I just
click on a widget to give it focus, what direction was that? - what if
focus was set programmatically?


                                                                         
  "Randy Hudson"                                                        
  <hudsonr@xxxxxxxxxx>                 To:                              
  Sent by:                     platform-swt-dev@xxxxxxxxxxx              
  platform-swt-dev-admin@eclip         cc:                              
  se.org                               Subject:                          
                               [platform-swt-dev] FocusGained, but in    
                               which direction                          
  08/04/2002 12:32 PM                                                    
  Please respond to                                                      
  platform-swt-dev                                                      
                                                                         




When my Canvas receives focus, I need to know if the user was possibly
doing a Shift+TAB to set focus on my Canvas.  The reason being that my
Canvas has its own focusable regions, and I need to traverse them in
Front-to-back or back-to-front order, depending on the traverse event
(which I can do).  However, the arrival of focus seems to not have a
direction, so I have to always start at the front even if the user is
trying to TAB backwards.

_______________________________________________
platform-swt-dev mailing list
platform-swt-dev@xxxxxxxxxxx
http://dev.eclipse.org/mailman/listinfo/platform-swt-dev




_______________________________________________
platform-swt-dev mailing list
platform-swt-dev@xxxxxxxxxxx
http://dev.eclipse.org/mailman/listinfo/platform-swt-dev



Back to the top