> > I have a form that has visible = .f.
> > In the init of controls on the form, there is a control.setfocus that makes the form visible = .t.
> > Its not a specific contro, there are a bunch of them and a bunch of forms so putting code in the setfocus is not really an option.
> > How can I catch this event (visible changes from .f. to .t.) and reset visible = .f.?
> > I tried assign method and form.gotfocus method and programaticchange method but none of these trigger.
> > Any ideas how to catch the change of form visible value and reset it to false?
> > Cheers
> >
> > David Younger
>
>
>
> David,
> Your question is not clear.
> In the 'init of controls' is this a typo or what controls are you talking? The form itselve has only one init.
> Just put Thisform.visible = .T. in the form will make it visible.
> If you have subclassed your form than if you put this in the class, all the forms derived, the whole bunch, will benifit from this one line.
> Dont think you should tamper with form.gotfocus or the programmaticchange event, which does not exists on a form (only on Check-, Combo-, Edit-, List- and TextBox and Command- and OptionGroup and Spinner)
> Can you elaborate your problem?
> Regards,
> Koen
Hi Koen,
On the form there are a bunch of controls (of course).
When the form loads, it runs the init of the controls first before it runs the init of the form.
In the init of some of the controls is the comand THIS.SetFocus (for whatever reason it is there).
When this occurs, the form becomes visible.
I want to catch this event when the form.visible becomes .t.
Cheers
David Younger