I created a form containing TVirtualStringTree that works in Delphi 7 and Delphi 2010. I notice that as I move between the two platforms, I get the message "list of options ... different from" on tree events and that the row type Bewteen TWideString (D7) and string (D2010) changes. The only trick I found to work on suppressing this error is to use compiler directives as follows:
{$IFDEF TargetDelphi7} procedure VirtualStringTree1GetText(Sender: TBaseVirtualTree; Node: PVirtualNode; Column: TColumnIndex; TextType: TVSTTextType; var CellText: WideString); {$ELSE} procedure VirtualStringTree1GetText(Sender: TBaseVirtualTree; Node: PVirtualNode; Column: TColumnIndex; TextType: TVSTTextType; var CellText: string); {$ENDIF}
and repeat this when the events are realized. Am I missing a simple solution? Thanks.
source share