Konuyu Oyla:
  • Derecelendirme: 4.5/5 - 2 oy
  • 1
  • 2
  • 3
  • 4
  • 5
Font style'lerinde bozulmalar
#1
Arkadaşlar ek dosyada ekran görüntüsü attım böyle bir sorun ile karşılaştınızmı hiç ?
Fontların renklerini boyutlarını ayarlıyorum ama telefonda kafasına göre çıkıyor bu nasıl iştir.
ekte kırmızı oval içine aldıklarım ayarladıklarım ama 1 tanesi bile telefonda istediğim gibi çıkmıyor.
Enteresan bir durum.
Ek dosya
Cevapla
#2
Bunuda yaptım faydası olmadı

procedure TForm1.fontduzelt;
var i:Integer;
begin
 for i:=0 to Self.ComponentCount-1 do
 begin
   if Self.Components[i] is TLabel then
   begin
     if (Self.Components[i] as TLabel).Tag.ToString='1' then
     begin
     (Self.Components[i] as TLabel).TextSettings.Font.Family := 'Arial';
     (Self.Components[i] as TLabel).TextSettings.Font.Size:=13;
     (Self.Components[i] as TLabel).TextSettings.Font.Style:=[TFontStyle.fsBold];
     (Self.Components[i] as TLabel).TextSettings.FontColor:=TAlphaColorRec.Red;
     end;
     if (Self.Components[i] as TLabel).Tag.ToString='2' then
     begin
     (Self.Components[i] as TLabel).Margins.Top:=5;
     (Self.Components[i] as TLabel).TextSettings.Font.Family := 'Arial';
     (Self.Components[i] as TLabel).TextSettings.Font.Size:=11;
     (Self.Components[i] as TLabel).TextSettings.Font.Style:=[TFontStyle.fsBold];
     (Self.Components[i] as TLabel).TextSettings.FontColor:=TAlphaColorRec.Black;
     end;
     if (Self.Components[i] as TLabel).Tag.ToString='3' then
     begin
     (Self.Components[i] as TLabel).Margins.Top:=5;
     (Self.Components[i] as TLabel).TextSettings.Font.Family := 'Arial';
     (Self.Components[i] as TLabel).TextSettings.Font.Size:=11;
     (Self.Components[i] as TLabel).TextSettings.Font.Style:=[TFontStyle.fsBold];
     (Self.Components[i] as TLabel).TextSettings.FontColor:=TAlphaColorRec.Darkgray;
     end;
   //(Self.Components[i] as TLabel).Repaint;
   end;
 end;
end;
Cevapla
#3
Merhaba,
TPresentedTextControl sınıfına ait tüm bileşenler varsayılan olarak sabit Family, Size, Style, FontColor değerlerine sahiptir. Bileşenin sahip olduğu varsayılan font stilinin değiştirilebilmesi için TStyledSettings özelliklerinin serbest bırakılması (False olması) gerekiyor.   

Örnek:
procedure TForm1.Button1Click(Sender: TObject);
begin
  Label1.StyledSettings := Button1.StyledSettings - [TStyledSetting.FontColor, TStyledSetting.Style, TStyledSetting.Size];
  Label1.TextSettings.Font.Size := 25;
  Label1.TextSettings.Font.Style := [TFontStyle.fsBold];
  Label1.TextSettings.FontColor := ColorPanel1.Color;
end;

Styled.gif
DelphiCan'dır!
Cevapla


Konu ile Alakalı Benzer Konular
Konular Yazar Yorumlar Okunma Son Yorum
  Fmx Android ve IOS Custom Font Kullanımı frmman 8 1.523 04-06-2025, Saat: 20:57
Son Yorum: Mr.X
  DATABASE FONT STYLE Altıner 3 959 20-08-2024, Saat: 21:36
Son Yorum: Altıner
  Andorid Font Hakkında barissagir 2 981 20-11-2023, Saat: 09:05
Son Yorum: RAD Coder
  FMX Mimarisinde Harici FONT (True - Type) Kullanmak RAD Coder 1 978 26-10-2023, Saat: 18:40
Son Yorum: SamerAssil
  Android ayarlarındaki font boyutuna uyumluluk serifaliyagci 1 1.045 02-07-2023, Saat: 23:11
Son Yorum: serifaliyagci



Konuyu Okuyanlar: 1 Ziyaretçi