[DUG] Delphi internals - form events
David Brennan
dugdavid at dbsolutions.co.nz
Wed Aug 10 16:06:22 NZST 2005
Yes, SetFocus will fail. It calls CanFocus which checks whether the control
and it's containers are visible. Since the form the button is on isn't
visible yet CanFocus will return false and SetFocus will raise an exception.
Note you can call CanFocus yourself if you want to see if a control is
focusable.
David.
-----Original Message-----
From: delphi-bounces at ns3.123.co.nz [mailto:delphi-bounces at ns3.123.co.nz] On
Behalf Of John Bird
Sent: Wednesday, 10 August 2005 3:58 p.m.
To: 'NZ Borland Developers Group - Delphi List'
Subject: RE: [DUG] Delphi internals - form events
So if the Create event is after the DFM is read and all components exist it
looks like the components can be accessed...
is there anything that cannot be done....How about button1.setfocus - will
this fail in the Create event?
(I will experiment, just trying to get to the grips on good practice of what
to put where, even Google doesn't shed much light)
John B
_______________________________________________
Delphi mailing list
Delphi at ns3.123.co.nz
http://ns3.123.co.nz/mailman/listinfo/delphi
More information about the Delphi
mailing list