[Lazarus] Custom composite components issue with latest Lazarus
Paul Ishenin
ip at kmiac.ru
Tue Feb 1 09:21:50 CET 2011
01.02.2011 15:10, Graeme Geldenhuys wrote:
> ---8<-----------8<-----------8<-----------8<-----------8<-----------
> {$IFDEF FPC}
> Include(FLabel.ComponentStyle, csSubComponent);
> Include(FLabel.ControlStyle, csNoDesignSelectable);
> Include(FWinControl.ComponentStyle, csSubComponent);
> Include(FWinControl.ControlStyle, csNoDesignSelectable);
> {$ENDIF}
> ---8<-----------8<-----------8<-----------8<-----------8<-----------
> 2) ComponentStyle now seems to be a read-only property, where I guess
> before it was read/write. How am I supposed to fix this code now?
> FComponentStyle is also Protected, so I can't access it normally, except
> with the "friend class hack". Is the hack the only way? Why is
> ComponentStyle now read-only, and why is there no SetComponentStyle
> method as replacement?
Because not every component style should be controlled by user code.
Use FLabel.SetSubComponent(True)
Best regards,
Paul Ishenin
More information about the Lazarus
mailing list