2011/12/11 Bart <[email protected]>: > 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;
I tried to run this code, but I have not found the function GetCurrentEditor. This code works with a PageControl over another PageControl? -- Silvio Clécio =============================================== Blog - <silvioprog.com.br> Twitter - <twitter.com/silvioprog> Facebook - <facebook.com/silvioprog> LazSolutions - <code.google.com/p/lazsolutions> Lazarus-BR - <groups.google.com.br/group/lazarus-br?hl=pt-BR> =============================================== * Conheça nosso canal IRC sobre Lazarus: #lazarus-br * =============================================== -- _______________________________________________ Lazarus mailing list [email protected] http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
