I am trying to use both the Lazarus TStringGrid and the tkweb KGrid in the same application. The grids are created at runtime. The problem I have is setting the Options parameters for the Lazarus TStringGrid.
newgrid is the newly created TStringGrid .......
With newgrid do
begin
Options:=[];
Options:=[goEditing,goThumbtracking];
end;
this results in: Error: Incompatible types: got "TGridOption" expected "TKGridOption"
If I remove goThumbtracking, which is not a KGrid Option (but goEditing is), this results in
Error: Incompatible type for arg no. 1: Got "Set Of TKGridOption", expected "TGridOptions"
grids.pas(2508,23) Hint: Found declaration: TCustomGrid.SetOptions(const TGridOptions);
So whichever way I try it, the expectation is for the other GridOptions.
There are no problems with setting the KGrid Options.
The documentation with KGrid discusses possible TKCustomGrid and TCustomGrid incompatibilities but does not specifically mention GridOptions:
"All properties available in standard grids have been implemented in KGrid. However there are several incompatibility issues
1. The class TKCustomGrid stands for TCustomGrid and TCustomDrawGrid. The class TKGrid stands for TStringGrid and TDrawGrid.....All types have the TKGrid prefix except the TKCustomGrid and TKGrid classes....."
Can anyone say whether this is likely to be the cause and if so possibly suggest a way round?
Thanks.