| Example: |
For the following example suppose that the user has clicked the mouse
somewhere on the chart area. The code below shows how to change the color
of the nearest item on the chart to the color "clLime".
var
Item : longint;
ItPar : Tr3ChartItem;
dist : double;
begin
with Rot3D1 do
begin
Item := FindNearestItemScreen (MousePosX, MousePosY, tkEverything, dist);
if Item <> -1 then
begin
Itpar := GetItemParams (Item);
ItPar.Color := clLime;
SetItemParams (Item, ItPar);
MakeVisible;
end;
end;
end;
|