Subject Re: pushbutton
From Lee Grant <>
Date Tue, 29 Nov 2022 18:41:54 -0500
Newsgroups dbase.getting-started


By the way I renamed your method for the Add to keep it consistent with
the object, renaming it PBSave, rather than PBADD. :)


On 11/29/2022 6:32 PM, Lee Grant wrote:
> Mustansir,
> I've been playing with this and it's been bugging me, because sometime
> the tab enter worked, other times it didn't. I suspect that the problem
> is not going to be obvious.
> My first take was why are you trying to hit tab and enter to make the
> text appear in the Text label object, when simply hitting tab after the
> last entryfield could have triggered the entry by onLostFocus for the
> entryfield, or the onGotFocus property of the Text label object...but
> regardless, I view a pushbutton as that, to be used as a pushbutton with
> a mouse. If using data entry keyboard only, the space key once it has
> the focus should be exactly what you need. I tried making sure CUAENTER
> was set on in the .wfm, but apparently that has no it did in
> a previous newsgroup help request.
> So I started trying to narrow down why it worked for me once, but not
> consistently, and I found out that to make it work consistently with the
> tab from the entryfield -> pushbutton....this is the procedure you need
> to follow.
> Click the dropdown box, select a name (I put an empty space for first
> choice), click the entryfield. Type the amount and then tab to the
> pushbutton and hit enter and it works everytime. Apparently, to me, the
> mouse clicking in the dropdown and entryfield seems to be making the
> mouse the focus in those objects and when you finally tab to the
> pushbutton, it truly is moving the Focus..whereas when you click the
> dropbox, and tab to the entryfield and enter an amount and then tab to
> the pushbutton, it takes two times to hit the enter key to move the
> focus over to the actual pushbutton and then the second one executes it.
> I wish I had some experience getting a screen movie of what I'm
> describing so it would be clear, but I suspect that not using the mouse
> to move between objects is the reason when you finally tab to the
> pushbutton, that the focus isn't really where it should be. Best way I
> know to describe this behavior.
> I'm including your file with my changes so there isn't a 'default'
> selection in the dropbox.
> Lee
> On 11/29/2022 1:57 PM, Mustansir Ghor wrote:
>> 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
> <snip>