[Lazarus] TTabControl (d)evolution
Felipe Monteiro de Carvalho
felipemonteiro.carvalho at gmail.com
Fri Aug 5 10:08:30 CEST 2011
On Thu, Aug 4, 2011 at 7:27 PM, Hans-Peter Diettrich
> I still doubt that ;-)
Well, what do you propose for gtk2 then?
> I don't understand what you mean :-(
Override NewInstance and hardcode TWSWinControl as the WidgetSetClass:
class function TLCLComponent.NewInstance: TObject;
begin
Result := inherited NewInstance;
WSRegisterClass;
TLCLComponent(Result).FWidgetSetClass := FindWSComponentClass(Self);
if TLCLComponent(Result).FWidgetSetClass = nil then
begin
{$IFDEF VerboseLCL}
DebugLn(['TLCLComponent.NewInstance WARNING: missing
FWidgetSetClass ',ClassName]);
{$ENDIF}
TLCLComponent(Result).FWidgetSetClass := TWSLCLComponent;
end;
end;
And also override any method from TCustomTabControl which expects a
TWSCustomTabControl, otherwise it will crash.
--
Felipe Monteiro de Carvalho
More information about the Lazarus
mailing list