From: Kevin A. <al...@se...> - 2001-08-26 14:28:06
|
> From: Andy Todd > > Anyway, I'm trying to set the application focus in response to an event. > In particular, when the user presses a button in my application I would > like to lead them by the hand and place the cursor in another widget. > > For future use I'm thinking we would want to be able to change the > application focus between different windows, regions, etc. This came up last week for me when I was trying to do a Find for one of the samples. Essentially, what you need to be able to do is post an event, specifically a wxPython SetFocus event. Now that you've reminded me, I'll go back and look at it, but we may have to wait until Rowland has some time to look at the event framework before this will get fixed. > Whilst I'm at it, we may want another attribute for each widget that > indicates its tab order. It is sometimes useful to vary the navigation > path between fields depending on various rules. Also, it may be > necessary to specify widgets in a certain order in the resource file but > have the default tab order through them to be different. There is a SF tracker issue for this: http://sourceforge.net/tracker/index.php?func=detail&aid=442241&group_id=190 15&atid=369015 > I know this is all irrelevant if you use the mouse to navigate to a > specific widget, but in the kind of applications which I sometimes write > (data entry for databases) where speed of input is optimum the default > user behaviour is to use the tab key to navigate between elements so > that you don't have to take your hand away from the keyboard at any time. I added an 'order' list to components yesterday to keep track of the order the widgets in the components dictionary were created. The creation order determines the tab order in the panel as well as how the widgets overlap right now. The first item in the .rsrc.py component list will be the first item tabbed to and will overlap any other widgets defined after it. The addition of the order list allowed me to fix the resourceEditor and Property Editor so that the output of the View Attributes and Property Editor components list now displays the widgets in the correct order. ka |