Subject Re: radio button
From Mustansir Ghor <mustan31@hotmail.com>
Date Sat, 18 Jul 2020 10:16:54 -0400
Newsgroups dbase.getting-started

Dear Mervyn

Thank you so much. Sorry I did not access news group since a week.

I will revert once i am successful.

Asante sana

Regards
Mustansir

Mervyn Bick Wrote:

> On 2020-07-12 06:42, Mustansir Ghor wrote:
> > Dear All
> >
> > I am using radio buttons where on selection the current data needs to be cleared in the grid. On  selecting I put msgbox for confirmation. If the user says "NO" then I need to restore to original selection. Since on selecting,  the ongotfocus event of object being selected executes, I wonder how we capture the before selection state and use it to restore for "NO" option of user
>
> The radiobutton object has what appears to be a bug in that the onChange
> event fires before the onLeftMouseDown event fires.  This means there is
> no opportunity to warn the user of possible consequences before the
> actual selection change is made.
>
> The CALLBACK command was introduced with dBASE Plus 8 and this has given
> us the ability to look inside Windows and see keystrokes and mouse
> events before dBASE does.  Using  CALLBACK and some Windows API
> functions I have managed to put together a custom radiobutton which
> looks as if it does what you need.
>
> The custom control and a test form are attached.
>
> Mervyn.
>