Hi,
tiOPF v2 has a few "unsupported" LCL components. They are basically composite components (eg: a panel with other embedded components). Before, the following code compiled without problems. A user reported that it doesn't compile any more.
---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<-----------There are two problems really.
1) Since recent FPC release, the Include() may not take a property as a parameter. This is easily worked around, so not a problem.
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?
On a side note:
If you don't know what the code above does... well, Lazarus form designer has a loong time bug with composite components, treating each component separately (sub component could even be deleted), where in fact they were supposed to be treated as a single component. The code above alleviated some of the Lazarus issues, but it was still very buggy.
Regards,
- Graeme -
