Цитата(ASGDeveloper @ 28.8.2007, 08:31) | Сделай тогда так:
|
Спасибо большое за помощь!!! Что-то то я тут от всей суеты совсем запарился...Разобрался как все сделать! 
Код | procedure TFormdll.VST1CompareNodes(Sender: TBaseVirtualTree; Node1, Node2: PVirtualNode; Column: TColumnIndex; var Result: Integer); var BaseTree: TVirtualStringTree; begin
BaseTree := TVirtualStringTree(Sender);
if ((tipe_c[Column]='int') or (tipe_c[Column]='bigint') or (tipe_c[Column]='binary') or (tipe_c[Column]='smallint') or (tipe_c[Column]='bit') or (tipe_c[Column]='decimal') or (tipe_c[Column]='numeric') or (tipe_c[Column]='tinyint')) then
if StrToInt(BaseTree.Text[Node1,column])> StrToInt(BaseTree.Text[Node2,column]) then Result:=1 else if StrToInt(BaseTree.Text[Node1,column])< StrToInt(BaseTree.Text[Node2,column]) then Result:=-1 else Result:=0
else if ((tipe_c[Column]='float') or (tipe_c[Column]='money') or (tipe_c[Column]='smallmoney')) then if StrToFloat(BaseTree.Text[Node1,column])> StrToFloat(BaseTree.Text[Node2,column]) then Result:=1 else if StrToFloat(BaseTree.Text[Node1,column])< StrToFloat(BaseTree.Text[Node2,column]) then Result:=-1 else Result:=0
else Result := AnsiStrComp(PChar(string(BaseTree.Text[Node1, Column])), PChar(string(BaseTree.Text[Node2, Column]))); end;
|
|