1
我的問題。 我在運行時創建TListBoxItem
和TLabel
。 創建所有組件,但不應用TLabel
樣式。如果在運行時創建Firemonkey組件樣式不起作用
我是否需要調用其他函數來應用樣式?
我的代碼:
// LIST ITEM
LB_Item := TListBoxItem.Create(POSTAVKE);
with LB_Item do
begin
Parent := POSTAVKE;
Height := 50;
Selectable := True;
end;
// LABEL 1
LB_Label1 := TLabel.Create(nil);
with LB_Label1 do
begin
Parent := LB_Item;
Align := TAlignLayout.alLeft;
Width := 50;
Font.Size := 12;
TextAlign := TTextAlign.taCenter;
Text := IntToStr(Kolicina);
Font.Size := 14;
Font.Style := [TFontStyle.fsBold];
FontColor := TAlphaColorRec.Darkslategray;
HitTest := False;
end;
......
Application.ProcessMessages;
謝謝,現在它工作 – xJernej