I have the following code:
if Self.CanFocus then
Self.SetFocus;
This results in an exception saying 'You cannot focus an invisible or
disabled window'. I thought that the point in CanFocus was to check this.
Am I doing something wrong?
In this case Self is a TFrame descendant. A colleague of mine has also
experienced a similar problem with TTreeView.
Regards,
Nick Pollard
"Nick Pollard" <nr...@hotmail.com> wrote in message
news:3d7885f6$1...@newsgroups.borland.com...
It is often safer to set ActiveControl rather than directly set the focus.
When the active control is able to receive focus it will do so.
--
Regards,
Chris Luck.