unit TestNuvola;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, Menus, ImgList, IconsIncluder, StdCtrls, ToolWin, ComCtrls;



type
  TfrmTestNuvola = class(TForm)
    tbIcons: TToolBar;
    btnPopulateToolbar: TButton;
    procedure ToolButtonClick(Sender: TObject);
    procedure btnPopulateToolbarClick(Sender: TObject);
  private
    { Private declarations }
  public
    NuvolaForm: TForm;
    { Public declarations }
  end;

var
  frmTestNuvola: TfrmTestNuvola;

implementation

{$R *.dfm}

procedure TfrmTestNuvola.btnPopulateToolbarClick(Sender: TObject);
var
i: integer;
tb: TToolButton;

begin
  for i := IconsInc.il24_Normal.Count-1 downto 0 do
    begin
      tb := TToolButton.Create(tbIcons);
      tb.Parent := tbIcons;
      tb.ImageIndex := i;
      tb.OnClick := ToolButtonClick;
      if (i mod 10) = 9 then
        tb.Wrap := True;
    end;
end;

procedure TfrmTestNuvola.ToolButtonClick(Sender: TObject);
begin
  ShowMessage('Icon number ' + IntToStr(TToolButton(Sender).ImageIndex));
end;

end.













