|
code
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
detect tab keypress on checkbox - how?is a cancel and a save button. What I want to happen is when the user reaches the end of all the objects on a given tab page using teh tab key, the focus goes to cancel button, the save button, then back to the first control on tab (word 97 options does this for instance) To do this I need to know when the tab key is pressed while the last object on the tab has the focus so I can set the focus to the Cancel button. BUT, VB6 doesn't seem to trap the keydown or keypress events for checkboxes (the most frequent last object), unless it's the space bar. I don;t want to use lostfocus because this creates very strange behaviour for mouse users - they click another object and the focus goes to the cancel button. Only solution currently in my head is to send focus from last object to a lable or something using tab order then trapping that focus and redirecting it - but that's a bit heath-robinson. Any suggestions? Am I missing somethinghere? Marshal newsp***@getridofthismarshal.co.uk (Marshal Anderson)'s wild
thoughts were released on Wed, 19 Oct 2005 08:10:19 GMT bearing the following fruit: >Got a form with sstab control - several tabs. Separate from the tabs No you don't, what you need to do is disable any controls on>is a cancel and a save button. What I want to happen is when the user >reaches the end of all the objects on a given tab page using teh tab >key, the focus goes to cancel button, the save button, then back to >the first control on tab (word 97 options does this for instance) > >To do this I need to know when the tab key is pressed while the last >object on the tab has the focus so I can set the focus to the Cancel >button. the other tabs. Since you've put a frame on each tab to hold the controls (if not then do it now) then it's simply a case of disabling the other frames. Luckily an event fires when the user changes tab which makes enabling and disabling the relevant frames a piece of cake. Then you will be able to tab along the form as you indicated (providing you've set the tabidexes correctly). J Show quoteHide quote >BUT, VB6 doesn't seem to trap the keydown or keypress events Jan Hyde (VB MVP)>for checkboxes (the most frequent last object), unless it's the space >bar. I don;t want to use lostfocus because this creates very strange >behaviour for mouse users - they click another object and the focus >goes to the cancel button. > >Only solution currently in my head is to send focus from last object >to a lable or something using tab order then trapping that focus and >redirecting it - but that's a bit heath-robinson. > >Any suggestions? Am I missing somethinghere? > >Marshal -- The first scientists who studied fog were mistified. (Mike Bull) [Abolish the TV Licence - http://www.tvlicensing.biz/] On Wed, 19 Oct 2005 09:39:28 +0100, Jan Hyde
<StellaDrin***@REMOVE.ME.uboot.com> wrote: > Top hole :o)>No you don't, what you need to do is disable any controls on Marshal Show quoteHide quote >the other tabs. Since you've put a frame on each tab to hold >the controls (if not then do it now) then it's simply a case >of disabling the other frames. Luckily an event fires when >the user changes tab which makes enabling and disabling the >relevant frames a piece of cake. > >Then you will be able to tab along the form as you indicated >(providing you've set the tabidexes correctly). > >J
Subclass Help WM_NOTIFY
Efficient way to parse large files Division by Zero Error - Help Urgent Merge array in VB Problem executing a DTS from a VB6 application after installing th Controlling location of form within form "_files" folders and related folders How to monopolize Windows in vb6 task bar? Page designer in VB |
|||||||||||||||||||||||