Re: win32lib labels with hotkeys
- Posted by Derek Parnell <ddparnell at bigpond.com> May 30, 2003
- 366 views
Don't do anything yet! I'll give it some thought and come up with a suitable 'fix' for you. It might take an hour or so. ----- Original Message ----- From: "Pete Lomax" <petelomax at blueyonder.co.uk> To: "EUforum" <EUforum at topica.com> Subject: Re: win32lib labels with hotkeys > > > On Tue, 27 May 2003 23:47:32 +1000, Derek Parnell > <ddparnell at bigpond.com> wrote: > > > > >I forgot to mention a new feature with win32lib. > > > >If you create a label control (LText, RText, CText) and place an '&' in its > >caption, then if the next field created is an input field, that input field > >has its own hotkey set to the label's hotkey. Thus ... > > > > lbl = create(RText, "&Customer:", Win, 5,10, 80, 25, 0) > > custname = create(EditBox, "", Win, 85, 10, 100, 25, 0) > > > >means that when the user presses Alt-C, the cursor jumps to the custname > >field. > > I've just upgraded to 0.58.09. Prior to this mod I had several dummy > fields eg Zsh=create(LText,"&Z",win,0,0,0,0,0) to capture the Alt-Z, > and an ongotfocus() routine to handle things manually. There isn't a > specific control it applies to (it is actually a bitmap of four > buttons, in a popup window, that I've carefully positioned over the > titlebar, and I handle the mouse clicks in that region explicitly). > I'm not surprised (and not upset either) they don't work no more. It's > not exactly a common programming technique > > I think what I need to do is remove the &Z from the definition of Zsh > and call registerHotKey(Zsh,"&Z"), right? > > A similar problem I have is: > "&Size" "" > <Slider> > where there is a text field after the &Size which later gets set with > "50%", "100%" etc. Which of the following would you recommend: > 1) a change to win32lib to cope with this (leave vs_PreviousControl as > is if it already contains a hotkey on a static field & there is no > hotkey on the current static field) > 2) just swap the define of my second field up. > 3) merge the two labels. > 4) something else > > Lastly, this might cause a problem for Judith's IDE. I don't use it so > I don't know if it puts the fields in the right order. I often do eg > create(text,x,10,10..) > create(combo,x,30,7,..) > to make them line up, so a strict sort on y then x co-ordinates would > not work, > > Pete > <shrug> > I don't want to think of how many ongotfocus(ltext) routines I'm going > to have to find and delete. > </shrug> > > > > TOPICA - Start your own email discussion group. FREE! > >