You've already forked lazarus-ccr
LazStats: Integrate report and chart into form of BoxPlotUnit. Some minor refactoring.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@7682 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
@ -5,10 +5,14 @@ unit Utils;
|
||||
interface
|
||||
|
||||
uses
|
||||
Classes, SysUtils, StdCtrls, ComCtrls, Dialogs,
|
||||
Classes, SysUtils, Graphics, Controls, StdCtrls, ComCtrls, Dialogs,
|
||||
Globals;
|
||||
|
||||
type
|
||||
TToolbarPosition = (tpTop, tpLeft, tpRight);
|
||||
|
||||
procedure AddButtonToToolbar(AToolButton: TToolButton; AToolBar: TToolBar);
|
||||
procedure InitToolbar(AToolbar: TToolbar; APosition: TToolbarPosition);
|
||||
|
||||
function AnySelected(AListbox: TListBox): Boolean;
|
||||
|
||||
@ -27,6 +31,9 @@ function IndexOfString(L: StrDyneVec; s: String): Integer;
|
||||
|
||||
implementation
|
||||
|
||||
uses
|
||||
ToolWin;
|
||||
|
||||
// https://stackoverflow.com/questions/4093595/create-ttoolbutton-runtime
|
||||
procedure AddButtonToToolbar(AToolButton: TToolButton; AToolBar: TToolBar);
|
||||
var
|
||||
@ -41,6 +48,30 @@ begin
|
||||
end;
|
||||
|
||||
|
||||
procedure InitToolbar(AToolbar: TToolbar; APosition: TToolbarPosition);
|
||||
begin
|
||||
// AToolbar.Transparent := false;
|
||||
// AToolbar.Color := clForm;
|
||||
case APosition of
|
||||
tpTop:
|
||||
begin
|
||||
AToolbar.Align := alTop;
|
||||
AToolbar.EdgeBorders := [ebBottom];
|
||||
end;
|
||||
tpLeft:
|
||||
begin
|
||||
AToolbar.Align := alLeft;
|
||||
AToolbar.EdgeBorders := [ebRight];
|
||||
end;
|
||||
tpRight:
|
||||
begin
|
||||
AToolbar.Align := alRight;
|
||||
AToolbar.EdgeBorders := [ebLeft];
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
||||
|
||||
function AnySelected(AListBox: TListBox): Boolean;
|
||||
var
|
||||
i: Integer;
|
||||
|
Reference in New Issue
Block a user