Subject Re: OnClick?
From roy price <royprice@royprice.name>
Date Sat, 19 Jun 2021 19:05:39 -0400
Newsgroups dbase.getting-started

Akshat Kapoor Wrote:

> Good Morning Roy,
>
> > I have a simple form to add data to a file, as in the code below.
> >
> > The user (wife) has difficulty understanding the placement of the mouse
> > click should be at the beginning (left side) of the entryfield before
> > entering data.
> >
> > How can I force the initial mouse click to the leftmost position?
> > Regards
> > Roy Price
> >
> >   this.ENTRYFIELDTEMPBEFORE1 = new ENTRYFIELD(this)
> >     with (this.ENTRYFIELDTEMPBEFORE1)
> >        dataLink = form.dialysisrecord1.rowset.fields["tempbefore"]
> onGotFocus = {;this.keyboard( "{Home}" )}
> >        height = 33.0
> >        left = 147.0
> >        top = 220.0
> >        width = 91.0
> >        picture = "99.99"
> >        function = "J"
> >        fontSize = 18.0
> >     endwith
>
> Adding the above line should solve your problem.
> The above line is not tested.
> In case of errors remove the line
> Add a onGotFocus event using inspector
> Click on the spanner to modify the code
> and paste the following line in the code
>
> this.keyboard( "{Home}" )
>
>   prefer to use the following as my custom entryfield
>
> class mun_ENTRYFIELD(parentObj) of ENTRYFIELD(parentObj) custom
>     with (this)
>        onGotFocus = class::ENTRYFIELD_ONGOTFOCUS
>        height = 1.5
>        left = 11.0
>        top = 7.5
>        selectAll = true
>        width = 22.0
>        metric = 0        // Chars
>        value = "Entryfield1"
>     endwith
>
>     function ENTRYFIELD_onGotFocus()
>        this.keyboard( "{Home}" )
>        return
> endclass
>
> Use selectAll = true with caution
>
> Regards
> Akshat

Thanks Akshat,
I'll give that a try.....and see how the input clerk (wife) goes.
Regards
Roy Price