Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.clipper.visual-objects > #13075 > unrolled thread
| Started by | Robert Pope <cooeee@gmail.com> |
|---|---|
| First post | 2020-09-10 08:06 -0700 |
| Last post | 2020-09-14 23:42 -0700 |
| Articles | 6 — 3 participants |
Back to article view | Back to comp.lang.clipper.visual-objects
Form with no editable controls - Keyboard navigation Robert Pope <cooeee@gmail.com> - 2020-09-10 08:06 -0700
Re: Form with no editable controls - Keyboard navigation Massimo Bighelli <info@arcasistemi.it> - 2020-09-10 18:26 +0200
Re: Form with no editable controls - Keyboard navigation Robert Pope <cooeee@gmail.com> - 2020-09-10 09:48 -0700
Re: Form with no editable controls - Keyboard navigation Robert van der Hulst <robert@heliks.local> - 2020-09-11 15:34 +0200
Re: Form with no editable controls - Keyboard navigation Robert Pope <cooeee@gmail.com> - 2020-09-11 08:56 -0700
Re: Form with no editable controls - Keyboard navigation Robert Pope <cooeee@gmail.com> - 2020-09-14 23:42 -0700
| From | Robert Pope <cooeee@gmail.com> |
|---|---|
| Date | 2020-09-10 08:06 -0700 |
| Subject | Form with no editable controls - Keyboard navigation |
| Message-ID | <fac50eeb-cae7-4931-910f-7be51ae4c0c6o@googlegroups.com> |
Hi, I have a form with no editable controls. It is a dialog window that contains two fixed text control, one of which is invisible and serves only as a placeholder. I use that placeholder to embed child windows at the position of the placeholder, and then shift the placeholder position down ready for the next embed. Please see the attached image, because it will probably be much easier to follow than my description. https://imgur.com/a/sxVDGCw Where I'm having trouble is with keyboard navigation, which for my app is a must. I want to use the arrow keys to navigate up and down the list, escape to close the window, enter to select. The problem I'm encountering is that the window just consumes the first keystroke without doing anything. After that, everything works as expected. I assume Windows is going through some process of interrogation of my screen on the first keystroke and figuring out that there is no editable control and that it has to flick over into some other mode. Following that, my dispatch receives all the notifications I'd normally expect to see and everything works fine. For the WM_GETDLGCODE messages I'm responding with DLC_WANTALLKEYS. The events are being dispatched to the fixed text controls, and I pass that through to my window. I don't suppose anyone might have a tip on how I might avoid losing that first keystroke? My best guess is that I need to set a window style somewhere, but I haven't been able to figure it out yet. Cheers! Rob.
[toc] | [next] | [standalone]
| From | Massimo Bighelli <info@arcasistemi.it> |
|---|---|
| Date | 2020-09-10 18:26 +0200 |
| Message-ID | <rjdk38$37i$1@gioia.aioe.org> |
| In reply to | #13075 |
Hi Robert, have you tried to force focus on first control in postinit ? *Massimo Bighelli* ARCA Sistemi S.r.l. Il 10/09/2020 17:06, Robert Pope ha scritto: > Hi, > > I have a form with no editable controls. It is a dialog window that contains two fixed text control, one of which is invisible and serves only as a placeholder. I use that placeholder to embed child windows at the position of the placeholder, and then shift the placeholder position down ready for the next embed. Please see the attached image, because it will probably be much easier to follow than my description. > > https://imgur.com/a/sxVDGCw > > Where I'm having trouble is with keyboard navigation, which for my app is a must. I want to use the arrow keys to navigate up and down the list, escape to close the window, enter to select. > > The problem I'm encountering is that the window just consumes the first keystroke without doing anything. After that, everything works as expected. I assume Windows is going through some process of interrogation of my screen on the first keystroke and figuring out that there is no editable control and that it has to flick over into some other mode. Following that, my dispatch receives all the notifications I'd normally expect to see and everything works fine. > > For the WM_GETDLGCODE messages I'm responding with DLC_WANTALLKEYS. The events are being dispatched to the fixed text controls, and I pass that through to my window. > > I don't suppose anyone might have a tip on how I might avoid losing that first keystroke? My best guess is that I need to set a window style somewhere, but I haven't been able to figure it out yet. > > Cheers! > Rob. >
[toc] | [prev] | [next] | [standalone]
| From | Robert Pope <cooeee@gmail.com> |
|---|---|
| Date | 2020-09-10 09:48 -0700 |
| Message-ID | <f34962df-bd1b-4f24-8cf6-c9a422b6647fo@googlegroups.com> |
| In reply to | #13078 |
On Friday, September 11, 2020 at 2:26:20 AM UTC+10, Massimo Bighelli wrote: > have you tried to force focus on first control in postinit ? Yep. From both PostInit and PostShowDialog. I tried setting focus to the fixed text title, and to the first child window, neither of which did the trick unfortunately.
[toc] | [prev] | [next] | [standalone]
| From | Robert van der Hulst <robert@heliks.local> |
|---|---|
| Date | 2020-09-11 15:34 +0200 |
| Message-ID | <rjfucs$66f$1@gioia.aioe.org> |
| In reply to | #13080 |
Robert > On Friday, September 11, 2020 at 2:26:20 AM UTC+10, Massimo Bighelli wrote: >> have you tried to force focus on first control in postinit ? > > Yep. From both PostInit and PostShowDialog. I tried setting focus to the fixed text title, and to the first child window, neither of which did the trick unfortunately. > Try to overwrite the OnShown event (make sure you call super:OnShown() first). Robert
[toc] | [prev] | [next] | [standalone]
| From | Robert Pope <cooeee@gmail.com> |
|---|---|
| Date | 2020-09-11 08:56 -0700 |
| Message-ID | <174128b0-f176-4b6d-9a48-7bf2d38f0c04o@googlegroups.com> |
| In reply to | #13081 |
On Friday, September 11, 2020 at 11:34:24 PM UTC+10, Robert van der Hulst wrote: > Try to overwrite the OnShown event (make sure you call super:OnShown() first). Sorry, you've lost me there...? I can't see any methods named OnShow/OnShown in the VO documentation, references in cavo28\volib, or other posts mentioning it in this newsgroup. Cheers.
[toc] | [prev] | [next] | [standalone]
| From | Robert Pope <cooeee@gmail.com> |
|---|---|
| Date | 2020-09-14 23:42 -0700 |
| Message-ID | <eb7b815a-538f-4732-ae39-28774022fcfdo@googlegroups.com> |
| In reply to | #13075 |
On Friday, September 11, 2020 at 1:06:21 AM UTC+10, Robert Pope wrote: > Hi, > > I have a form with no editable controls. It is a dialog window that contains two fixed text control, one of which is invisible and serves only as a placeholder. I use that placeholder to embed child windows at the position of the placeholder, and then shift the placeholder position down ready for the next embed. Please see the attached image, because it will probably be much easier to follow than my description. > > https://imgur.com/a/sxVDGCw > > Where I'm having trouble is with keyboard navigation, which for my app is a must. I want to use the arrow keys to navigate up and down the list, escape to close the window, enter to select. > > The problem I'm encountering is that the window just consumes the first keystroke without doing anything. After that, everything works as expected. I assume Windows is going through some process of interrogation of my screen on the first keystroke and figuring out that there is no editable control and that it has to flick over into some other mode. Following that, my dispatch receives all the notifications I'd normally expect to see and everything works fine. > > For the WM_GETDLGCODE messages I'm responding with DLC_WANTALLKEYS. The events are being dispatched to the fixed text controls, and I pass that through to my window. > > I don't suppose anyone might have a tip on how I might avoid losing that first keystroke? My best guess is that I need to set a window style somewhere, but I haven't been able to figure it out yet. > > Cheers! > Rob. I just figured this one out. I neglected to inherit the main title fixed text from my own class that did the key processing. I assume that the first keystroke was changing focus to another control that did inherit correctly, which is why everything worked fine after that. It was my own silly error - Sorry!
[toc] | [prev] | [standalone]
Back to top | Article view | comp.lang.clipper.visual-objects
csiph-web