You've already forked lazarus-ccr
LazStats: Remove toolbar from DistribUnit (there is one inherited from TChartFrame). Some cosmetics
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@7676 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
@ -5,9 +5,11 @@ unit Utils;
|
||||
interface
|
||||
|
||||
uses
|
||||
Classes, SysUtils, StdCtrls, Dialogs,
|
||||
Classes, SysUtils, StdCtrls, ComCtrls, Dialogs,
|
||||
Globals;
|
||||
|
||||
procedure AddButtonToToolbar(AToolButton: TToolButton; AToolBar: TToolBar);
|
||||
|
||||
function AnySelected(AListbox: TListBox): Boolean;
|
||||
|
||||
procedure ErrorMsg(const AMsg: String);
|
||||
@ -25,6 +27,20 @@ function IndexOfString(L: StrDyneVec; s: String): Integer;
|
||||
|
||||
implementation
|
||||
|
||||
// https://stackoverflow.com/questions/4093595/create-ttoolbutton-runtime
|
||||
procedure AddButtonToToolbar(AToolButton: TToolButton; AToolBar: TToolBar);
|
||||
var
|
||||
lastBtnIdx: integer;
|
||||
begin
|
||||
lastBtnIdx := AToolBar.ButtonCount - 1;
|
||||
if lastBtnIdx > -1 then
|
||||
AToolButton.Left := AToolBar.Buttons[lastBtnIdx].Left + AToolBar.Buttons[lastBtnIdx].Width
|
||||
else
|
||||
AToolButton.Left := 0;
|
||||
AToolButton.Parent := AToolBar;
|
||||
end;
|
||||
|
||||
|
||||
function AnySelected(AListBox: TListBox): Boolean;
|
||||
var
|
||||
i: Integer;
|
||||
|
Reference in New Issue
Block a user