我正在使用dxBarManager1。为此,我分配了cxImageList1。 我在cxImageList1中添加了一个适当大小的图标并尝试(在formhow上):
dxBarLargeButton1.LargeImageIndex:= 0;
但它不会显示。 为什么?
代码很简单:
unit Unit3;
interface
uses
Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics,
Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.ImgList, cxGraphics, dxBar,
cxClasses;
type
TForm3 = class(TForm)
dxBarManager1: TdxBarManager;
dxBarManager1Bar1: TdxBar;
dxBarLargeButton1: TdxBarLargeButton;
cxImageList1: TcxImageList;
procedure FormShow(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form3: TForm3;
implementation
{$R *.dfm}
procedure TForm3.FormShow(Sender: TObject);
begin
dxBarLargeButton1.LargeImageIndex := 0;
end;
end.
答案 0 :(得分:2)
您需要为酒吧经理LargeImages
财产分配一些内容。
dxBarManager1.ImageOptions.LargeImages := cxImageList1;