Subject Re: pushbutton
From Ken Mayer <dbase@nospam.goldenstag.net>
Date Sun, 7 Mar 2021 21:10:33 -0800
Newsgroups dbase.getting-started

On 3/7/2021 12:43 PM, Gaetano D. wrote:
> 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?

I don't know of any such setting.

Ken


--
*Ken Mayer*
Ken's dBASE Page: http://www.goldenstag.net/dbase
The dUFLP: http://www.goldenstag.net/dbase/index.htm#duflp
dBASE Books: http://www.goldenstag.net/dbase/Books/dBASEBooks.htm
dBASE Tutorial: http://www.goldenstag.net/dbase/Tutorial/00_Preface.htm