Label Style fsBold
-
Hi,
ich erstelle ein dynamisches Array von Labels ond möcht da jetzt das die Schrift fett wird. Wie muss ich das machen? habe es so versucht:
for(int i = 0; i < MoTimeLabel.Length; i++) //Parameter für Labels einstellen { MoTimeLabel[i] -> Parent = MoBox; MoTimeLabel[i] -> Left = 16; MoTimeLabel[i] -> Top = 28+32*i; MoTimeLabel[i] -> Font -> Style << fsBold; MoTimeLabel[i] -> Caption = "NoTime"; MoTimeLabel[i] -> Show(); if(i%2 == 0) { MoTimeLabel[i] -> Font -> Color = EinColor; } else { MoTimeLabel[i] -> Font -> Color = AusColor; } }es funktioniert alles, sogar das mit der Farbe, nicht aber das mit dem fsBold, er ignoriert es einfach.
kann mir jemand helfen?
-
Probiers doch mal mit folgenden Zeilen (Erzeugen eines TFontStyle-Objektes MyStyle):
TFontStyles MyStyle;
MyStyle << fsBold;
Label1->Font->Style = MyStyle;Viel Spaß
-
Hat geklappt danke schön
-
Label1->Font->Style = Label1->Font->Style << fsBold;Siehe auch die FAQ zum "Umgang mit Set".