[Lazarus] Latest Chanhes brakes the WinCE Notebook/Tab controls

Hans-Peter Diettrich DrDiettrich1 at aol.com
Thu Jul 14 16:19:43 CEST 2011


Bart schrieb:
> It is Felipe's work in progress I think.

Yes, based on my supplied patch, that's why I can explain what remains 
to do.


The mapping between logical Pages and visible Tabs in the 
TCustomNotebook was scattered into multiple unrelated places, e.g. 
TCustomPage and the widgetsets. The new TCustomNotebook does this 
mapping itself, in TabToPageIndex and PageToTabIndex, and these methods 
should be used by the widgetsets.

I'd suggest to remove GetPageRealIndex from the widget classes at all, 
to prevent possibly incompatible overrides. When ever required, a widget 
should use PageToTabIndex instead of GetPageRealIndex, and 
TabToPageIndex for NotebookPageRealToLCLIndex.

Eventually another Delphi compatible rename should be made. As I just 
found out, Delphi defines PageIndexFromTabIndex for my TabToPageIndex. 
But since this is a private method in TPageControl, and the LCL used 
other names for the same purpose, a rename is not required.

DoDi





More information about the Lazarus mailing list