| Subject |
Re: pushbutton |
| From |
Mustansir Ghor <mustan31@hotmail.com> |
| Date |
Tue, 29 Nov 2022 13:57:31 -0500 |
| Newsgroups |
dbase.getting-started |
| Attachment(s) |
ghor.wfm |
Dear Ken sir and Mervyn Sir
I am little scared for posting this here. In case my observation proves wrong then its ok but I need to put it here. I tested Mervyn Sir program and even before posting my issue i had made samething as selftest. However to portray my problem I simplified my form and attaching here.
The form has 4 objects. Combobox, Entryfield, Pushbutton and text.
The combobox is filled with array data (sample data).
When you run the form, comboxbox gets focus, you can select anydata and press Tab key. It goes to Entryfield, here you need to enter amount (any amount) and then press Tab key again so it moves to pushbutton (here if you click or press space bar then it works fine and displays the contents in text box) . If you press Enter key once nothing happens, On pressing 2nd time it then displays the contents in text box.
On otherhand when focus comes to Entryfield and after typing the value you press Enter key and then move to pushbutton with Tabkey, then pushbutton works on 1st instance.
Pls bear with me if my observations are proven wrong but it will help to correct myself as to where I am making mistake.
Thanking you all
Best Regards
Mustansir
Mervyn Bick Wrote:
> On 2022/11/28 20:42, Mustansir Ghor wrote:
> > Dear All
> >
> > When Pushputton gets focus in dbase 2019, I need to press Enter button twice to execute the push button whereas same form if I run in dbase 11 plus the pushbutton executes with focus on it by pressing it only once.
> >
> > If anybody has any clue where I need to correct pls advice me.
>
> We need to see some code. The attached form behaves exactly the same in
> dBASE 11 and dBASE 2019. If you click on a pushbutton the onClick
> event fires. If you tab to a pushbutton and press enter the onclick
> event fires.
>
> If you need to press enter twice to get a pushbutton on the test form to
> fire twice there is a problem with your installed copy of dBASE 2019.
>
> Mervyn.
>
> ** END HEADER -- do not remove this line
> //
> // Generated on 2022-11-29
> //
> parameter bModal
> local f
> f = new test_pb_clickForm()
> if (bModal)
> f.mdi = false // ensure not MDI
> f.readModal()
> else
> f.open()
> endif
>
> class test_pb_clickForm of FORM
> with (this)
> onOpen = class::FORM_ONOPEN
> height = 16.0
> left = 33.7143
> top = 0.7727
> width = 40.0
> text = \"\"
> endwith
>
> this.ENTRYFIELD1 = new ENTRYFIELD(this)
> with (this.ENTRYFIELD1)
> height = 1.0
> left = 8.2857
> top = 2.4545
> width = 8.0
> value = \"Entryfield1\"
> endwith
>
> this.PUSHBUTTON1 = new PUSHBUTTON(this)
> with (this.PUSHBUTTON1)
> onClick = class::PUSHBUTTON1_ONCLICK
> height = 1.0909
> left = 8.2857
> top = 5.7273
> width = 15.2857
> text = \"Pushbutton1\"
> endwith
>
> this.PUSHBUTTON2 = new PUSHBUTTON(this)
> with (this.PUSHBUTTON2)
> onClick = class::PUSHBUTTON2_ONCLICK
> height = 1.0909
> left = 8.2857
> top = 8.5
> width = 15.2857
> text = \"Pushbutton2\"
> endwith
>
> this.PUSHBUTTON3 = new PUSHBUTTON(this)
> with (this.PUSHBUTTON3)
> onClick = class::PUSHBUTTON3_ONCLICK
> height = 1.0909
> left = 8.2857
> top = 11.3636
> width = 15.2857
> text = \"Pushbutton3\"
> endwith
>
> this.ENTRYFIELD2 = new ENTRYFIELD(this)
> with (this.ENTRYFIELD2)
> height = 1.0
> left = 8.2857
> top = 13.8636
> width = 8.0
> value = \"Entryfield2\"
> endwith
>
>
> function PUSHBUTTON1_onClick()
> ?\'Pushbutton 1 clicked\'
> return
>
> function PUSHBUTTON2_onClick()
> ?\'Pushbutton 2 clicked\'
> return
>
> function PUSHBUTTON3_onClick()
> ?\'Pushbutton 3 clicked\'
> return
>
> function form_onOpen()
> clear
> return
>
> endclass
>
|
|