1. button question
- Posted by George Walters <gwalters at sc.rr.com> Aug 21, 2001
- 412 views
I have several buttons with underlined letters.(i.e. A&BORT, &NEXT, &FIND... etc). My question is that sometimes (when all fields on the screen are disabled) both 'ctrl-char' and 'alt-char' work the buttons, but when all screen text fields are enabled and the form is being filled/edited then 'ctrl-char' does not work but 'alt-char' does work. This seems inconsistent. Can someone explain what is going on here. Per David's response that 'ctrl-S' for save hopefully would work the save button but it won't. Only 'alt-S' works....?? ...george
2. Re: button question
- Posted by Travis Beaty <travisbeaty at arn.net> Aug 21, 2001
- 399 views
Hello! Text fields such as EditText and MleText will trap certain key combinations, such as ctrl-x (cut) ctrl-c (copy) and shift+insert (paste). If one of those controls has the focus, it may be muddling up things by intercepting the codes before they get to the buttons. Try taking these text fields out of focus, then use the combination and see if everything comes out right. Travis Beaty aka Palo Duro Solutions > >I have several buttons with underlined letters.(i.e. A&BORT, &NEXT, &FIND... >etc). My question is that sometimes (when all fields on the screen are >disabled) both 'ctrl-char' and 'alt-char' work the buttons, but when all >screen text fields are enabled and the form is being filled/edited then >'ctrl-char' does not work but 'alt-char' does work. This seems >inconsistent. Can someone explain what is going on here. Per David's >response that 'ctrl-S' for save hopefully would work the save button but it >won't. Only 'alt-S' works....?? > >...george > > > > > > >
3. Re: button question
- Posted by Derek Parnell <ddparnell at bigpond.com> Aug 21, 2001
- 399 views
Hi George, ----- Original Message ----- From: "George Walters" <gwalters at sc.rr.com> To: "EUforum" <EUforum at topica.com> Subject: button question > > I have several buttons with underlined letters.(i.e. A&BORT, &NEXT, &FIND... > etc). My question is that sometimes (when all fields on the screen are > disabled) both 'ctrl-char' and 'alt-char' work the buttons, but when all > screen text fields are enabled and the form is being filled/edited then > 'ctrl-char' does not work but 'alt-char' does work. This seems > inconsistent. Can someone explain what is going on here. Per David's > response that 'ctrl-S' for save hopefully would work the save button but it > won't. Only 'alt-S' works....?? I must be misunderstanding your concerns because I can't duplicate the effect I think you are describing. Your phrase "work the buttons" to me means that the buttons get focus and their onClick event fires. I cannot get the ctrl-char combination to do this whether fields are disabled or not. The ctrl-S convention is not automatic. If you want this combination to do a "save" operation for you, you must trap it yourself and handle the work. Ctrl-char is not meant to "work the buttons". Here is the code that I used to test for this effect. ------------------ include win32lib.ew without warning integer win, btn1, btn2, fld1, fld2, cb1, SB win = create(Window, "Test", 0, 0, 0, 400, 400, 0) SB = create(StatusBar, "", win, 0, 0, 0, 0, 0) btn1 = create(Button, "&NEXT", win, 5, 5, 60, 25, 0) btn2 = create(Button, "&ABORT", win, 85, 5, 60, 25, 0) fld1 = create(EditText, "" , win, 5, 55, 60, 25, 0) fld2 = create(EditText, "" , win, 85, 55, 60, 25, 0) cb1 = create(CheckBox, "a &check box caption", win, 5,105, 260, 25, 0) procedure clicker(integer self, integer event, sequence params) setText(SB, getText(self)) setEnable({fld1,fld2}, isChecked(cb1)) end procedure setHandler({btn1, btn2,cb1}, w32HClick, routine_id("clicker")) setHandler({fld1, fld2}, w32HGotFocus, routine_id("clicker")) WinMain(win, Normal) ---------------------- >I'm playing with check boxes and there's some text >that windows places after the box with some char's >surrounded by a dotted box. Where is that text >coming from and how do I control it? anyone know? >I have 3 checkboxes the first has a 'Y' the 2nd >and 3rd have a 'N' to the right of the box.... The text is coming from the second parameter of the CheckBox's create(). It is the caption. The space to display the caption is defined by the 6th parameter. Maybe you haven't defined enough room for the entire caption to display. The dotted line is Windows way of telling you that the checkbox has focus.