Topic: How to Show Caption In Toolbutton
I Try Create Toolbar and Toolbutton By Array Of TToolbutton
----
Create ToolBar OK
Create TToolbutton OK
But Not Show Caption In TToolbutton
How to Show Caption In Toolbutton ?
var
toolbar : Ttoolbar ;
toolbar_list : array of TToolbutton ;
i : Integer ;
begin
toolbar := Ttoolbar.Create(Form1) ;
toolbar.Parent := Form1.Panel1 ;
toolbar.showcaptions := true;
toolbar.Autosize := True ;
toolbar_list := ['AAA','BBB','CCC'] ;
For i := Length(toolbar_list) - 1 DownTo 0 DO
Begin
toolbar_list[i] := ttoolbutton.create(Form1) ;
toolbar_list[i].parent := toolbar;
toolbar_list[i].Autosize := True ;
toolbar_list[i].width := 100 ;
toolbar_list[i].caption := toolbar_list[i].Name ;
End;
end.
Easy For Beginner Student For Me