unit GlowButtonMainUnit1;

interface

uses
  Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics,
  Vcl.Controls, Vcl.Forms, Vcl.Dialogs, AdvShapeButton, Vcl.ExtCtrls, Vcl.Samples.Spin, AdvEdit, Vcl.StdCtrls,
  AdvOfficeComboBox, AdvToolBar, AdvGlowButton, System.Actions, Vcl.ActnList, System.ImageList, Vcl.ImgList,
  Vcl.VirtualImageList, Vcl.BaseImageCollection, Vcl.ImageCollection, AdvToolBarStylers, Winapi.ShellAPI, Vcl.Menus,
  AdvMenus;

type
  TForm1 = class(TForm)
    toolbarOfficeStyler: TAdvToolBarOfficeStyler;
    ImageCollectionWorkshop: TImageCollection;
    ImgListSmall: TVirtualImageList;
    ImgListLarge: TVirtualImageList;
    ActionList1: TActionList;
    actBarCode128Field: TAction;
    actBarcode25Field: TAction;
    actTextToBarcode: TAction;
    actBarCode39Field: TAction;
    actBarEAN13Field: TAction;
    actAddBarCode: TAction;
    actResetToText: TAction;
    actBarCode128: TAction;
    actBarCode2of5: TAction;
    actBarCode3of9: TAction;
    actEAN8: TAction;
    actEAN13: TAction;
    actQRCode: TAction;
    actDatamatrix: TAction;
    actBarEAN8Field: TAction;
    actQRCodeField: TAction;
    actDatamatrixField: TAction;
    actBarcodeToText: TAction;
    Ribbon1: TAdvToolBarPager;
    pageTextBarcodeFields: TAdvPage;
    tbAddFields: TAdvToolBar;
    AdvGlowButton55: TAdvGlowButton;
    AdvGlowButton56: TAdvGlowButton;
    AdvGlowButton57: TAdvGlowButton;
    AdvGlowButton58: TAdvGlowButton;
    AdvGlowButton59: TAdvGlowButton;
    AdvGlowButton60: TAdvGlowButton;
    AdvGlowButton61: TAdvGlowButton;
    tbConvertField: TAdvToolBar;
    btnBarcodeConvertDataField: TAdvGlowButton;
    pageFixedTextBarcodes: TAdvPage;
    tbConvertFixed: TAdvToolBar;
    btnConvertToBarcodeFixed: TAdvGlowButton;
    tbAddBarcodes: TAdvToolBar;
    btnAddBarCode: TAdvGlowButton;
    AdvGlowButton49: TAdvGlowButton;
    AdvGlowButton50: TAdvGlowButton;
    AdvGlowButton51: TAdvGlowButton;
    AdvGlowButton52: TAdvGlowButton;
    AdvGlowButton53: TAdvGlowButton;
    AdvGlowButton54: TAdvGlowButton;
    pageTextFormat: TAdvPage;
    tbTextFormat: TAdvToolBar;
    AdvToolBarContainer1: TAdvToolBarContainer;
    AdvToolBarSeparator4: TAdvToolBarSeparator;
    AdvToolBarSeparator5: TAdvToolBarSeparator;
    AdvToolBarSeparator7: TAdvToolBarSeparator;
    AdvToolBarSeparator1: TAdvToolBarSeparator;
    AdvToolBarSeparator8: TAdvToolBarSeparator;
    AdvToolBarSeparator6: TAdvToolBarSeparator;
    cmbFontName: TAdvOfficeFontSelector;
    btnBold: TAdvGlowButton;
    btnItalic: TAdvGlowButton;
    btnUnderline: TAdvGlowButton;
    btnStrikeout: TAdvGlowButton;
    btnAlignLeft: TAdvGlowButton;
    btnAlignCentre: TAdvGlowButton;
    btnAlignRight: TAdvGlowButton;
    btnFontSizeUp: TAdvGlowButton;
    btnFontSizeDown: TAdvGlowButton;
    btnFont: TAdvGlowButton;
    btnFontColour: TAdvGlowButton;
    btnTextAutoSize: TAdvGlowButton;
    cmbFontSize: TComboBox;
    btnResetText: TAdvGlowButton;
    btnLayoutBottom: TAdvGlowButton;
    btnLayoutMiddle: TAdvGlowButton;
    btnLayoutTop: TAdvGlowButton;
    btnClipped: TAdvGlowButton;
    btnTextColourBG: TAdvGlowButton;
    btnTextbackground: TAdvGlowButton;
    btnTextCase: TAdvGlowButton;
    edtFontSizeUnits: TAdvEdit;
    spinFontSizeUnits: TSpinButton;
    tbTextFieldActionsOLD: TAdvToolBar;
    AdvGlowButton24: TAdvGlowButton;
    pbRibbonTopLine: TPaintBox;
    ribbonFileButton: TAdvShapeButton;
    Label1: TLabel;
    pmuBarCodes: TAdvPopupMenu;
    Code1281: TMenuItem;
    Code3of91: TMenuItem;
    Code2of51: TMenuItem;
    EAN131: TMenuItem;
    EAN81: TMenuItem;
    QRCode1: TMenuItem;
    DataMatrix1: TMenuItem;
    procedure actBarcodeToTextExecute(Sender: TObject);
    procedure Label1Click(Sender: TObject);
    procedure AdvGlowButton24DropDown(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form1: TForm1;

implementation

{$R *.dfm}

procedure TForm1.actBarcodeToTextExecute(Sender: TObject);
begin
  ShowMessage('Demo app');
end;

procedure TForm1.AdvGlowButton24DropDown(Sender: TObject);
begin
  TAdvGlowButton(Sender).DropDownMenu.Tag := 1;
end;

procedure TForm1.Label1Click(Sender: TObject);
begin
  // https://support.tmssoftware.com/t/tadvglowbutton-as-dropdown-button-rendered-black-on-2nd-click-of-down-arrow/26850
  ShellExecute(self.handle, 'open',
    'https://support.tmssoftware.com/t/tadvglowbutton-as-dropdown-button-rendered-black-on-2nd-click-of-down-arrow/26850',
    '', '', SW_SHOWNORMAL);
end;

end.
