Class TPieChart (unit PieChart) |
Inherits from
TMultiColourControl
constructor Create (AOwner: TComponent);
procedure Clear;
destructor Destroy;
procedure SetDataAndLabels (source_data: TStringList);
remove any items in the list box
procedure DblClick;
procedure MouseDown (Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
copy the user's strings and objects to the list box
procedure Paint;
Protected declarations find out where we were clicked - in client co-ordinates translate this relative to the centre of the pie chart
function get_object_from_mouse_coords: boolean;
procedure MouseUp (Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
record the mouse co-ordinates in case of a subsequent double-click
procedure SetListBox (ListBox: TListBox);
property Font :
property Height :
Published declarations
property ListBox : TListBox
property ParentFont :
property Width :
property Canvas :
event OnDblClick : TNotifyEvent
event OnRightClick : TNotifyEvent
ClickedObject : TObject;
Public declarations
ClickedString : string;
FData : TStringListWithDouble;
Private declarations
FListBox : TListBox;
computed internal data
FMouseX : integer;
FMouseY : integer;
FOnDblClick : TNotifyEvent;
FOnRightClick : TNotifyEvent;
FTotal : double;
constructor Create (AOwner: TComponent);
procedure Clear;
destructor Destroy;
procedure SetDataAndLabels (source_data: TStringList);
remove any items in the list box
procedure DblClick;
procedure MouseDown (Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
copy the user's strings and objects to the list box
procedure Paint;
Protected declarations
find out where we were clicked - in client co-ordinates translate this relative to the centre of the pie chart
function get_object_from_mouse_coords: boolean;
procedure MouseUp (Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
record the mouse co-ordinates in case of a subsequent double-click
procedure SetListBox (ListBox: TListBox);
property Font :
property Height :
Published declarations
property ListBox : TListBox
property ParentFont :
property Width :
property Canvas :
event OnDblClick : TNotifyEvent
event OnRightClick : TNotifyEvent
ClickedObject : TObject;
Public declarations
ClickedString : string;
FData : TStringListWithDouble;
Private declarations
FListBox : TListBox;
computed internal data
FMouseX : integer;
FMouseY : integer;
FOnDblClick : TNotifyEvent;
FOnRightClick : TNotifyEvent;
FTotal : double;