On 12/10/11, silvioprog <[email protected]> wrote:
I remeber using SomeContrl.SetFocus in the OnChange of TPageControl
(actually I did an override on DoChange) and this works for me (on
Windows, not tested yet on other widgetsets).
Here's a snippet of the relevant code.
procedure TEditorPageControl.DoChange;
var
Ed: TEditor;
begin
inherited DoChange;
Ed := GetCurrentEditor;
InternalEditorStatusChange(Ed,
[scCaretX,scCaretY,scModified,scInsertMode,scFileName]);
if Assigned(Ed) then
begin
try
Ed.SetFocus;
except;
debugln('TEditorPageControl.DoChange: could not set focus to
current editor');
end;
end;
end;
Bart
--
_______________________________________________
Lazarus mailing list
[email protected]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus