| Subject |
Re: pushbutton |
| From |
Gaetano D. <gaetanodd@hotmail.com> |
| Date |
Mon, 8 Mar 2021 06:43:35 +1000 |
| Newsgroups |
dbase.getting-started |
On 8/03/2021 5:28, Mustansir Ghor wrote:
> Dear All
>
> I happen to use & as accelerator for pushbutton. However the onclick function executes twice with acclerator key. I checked this by putting ?form.activecontrol.name
>
> I am putting the program bellow
>
>
> ** END HEADER -- do not remove this line
> //
> // Generated on 07/03/2021
> //
> parameter bModal
> local f
> f = new ghor38Form()
> if (bModal)
> f.mdi = false // ensure not MDI
> f.readModal()
> else
> f.open()
> endif
>
> class ghor38Form of FORM
> with (this)
> height = 16.0
> left = 77.5
> top = 0.0
> width = 40.0
> text = ""
> endwith
>
> this.PUSHBUTTON1 = new PUSHBUTTON(this)
> with (this.PUSHBUTTON1)
> onClick = class::PUSHBUTTON1_ONCLICK
> height = 1.0909
> left = 13.0
> top = 4.0
> width = 15.2857
> text = "Pu&shbutton1"
> endwith
>
> this.ENTRYFIELD1 = new ENTRYFIELD(this)
> with (this.ENTRYFIELD1)
> height = 1.0
> left = 11.0
> top = 8.0
> width = 8.0
> value = "Entryfield1"
> endwith
>
>
> function PUSHBUTTON1_onClick()
> ?form.activecontrol.name
> return
>
> endclass
>
>
> Can anybody assists me to understand where is the error so that I can correct
>
> Best Regards
> Mustansir
>
I get the output at least twice in Plus11 but many times I get 3 outputs
- it depends on how long I press Alt-s for. in dBase 2019 I get it only
once if I push briefly, several times if I hold the keys down. I thought
it had something to do with the Keyboard repeat delay but I just tested
it and the delay setting does not affect this particular issue. It's
like Plus11 ignores the Keyboard repeat delay of Windows.
Ken, Is there a similar kbd repeat delay setting in dBase?
HTH
Gaetano.
|
|