Combobox font

FireMonkey ve Mobil uygulama (iOS, Android, Windows Phone) ile ilgili sorularınızı bu foruma sorabilirsiniz.
Cevapla
Kullanıcı avatarı
hido
Üye
Mesajlar: 268
Kayıt: 29 Mar 2014 04:32

Combobox font

Mesaj gönderen hido »

Merhaba.


Comboboxsın font boyutu istediğimiz gibi belirleyemiyoruz, bu konuda çözüm olarak ne yapabilirim???
Kullanıcı avatarı
RADCoder
Üye
Mesajlar: 129
Kayıt: 21 Ara 2013 04:03

Re: Combobox font

Mesaj gönderen RADCoder »

Merhabalar,
ComboBox'un İtemlerini eklerken ListBoxItem seçerek TextSettings içinde font ayarlarını kullanın, ve ya kod ile şu yöntemi kullanın:

Kod: Tümünü seç

ComboBox1.Items.BeginUpdate;
ComboBox1.ListBox.ListItems[1].TextSettings.Font.Size := 25;
ComboBox1.ListBox.ListItems[1].StyledSettings := ComboBox1.ListBox.ListItems[1].StyledSettings
- [TStyledSetting.Size];
ComboBox1.ListBox.ListItems[1].TextSettings.FontColor := TAlphaColorRec.Red;
ComboBox1.ListBox.ListItems[1].StyledSettings := ComboBox1.ListBox.ListItems[1].StyledSettings
- [TStyledSetting.ssFontColor];
ComboBox1.Items.EndUpdate;
Kolay gelsin..
Kullanıcı avatarı
hido
Üye
Mesajlar: 268
Kayıt: 29 Mar 2014 04:32

Re: Combobox font

Mesaj gönderen hido »

RADCoder yazdı:Merhabalar,
ComboBox'un İtemlerini eklerken ListBoxItem seçerek TextSettings içinde font ayarlarını kullanın, ve ya kod ile şu yöntemi kullanın:

Kod: Tümünü seç

ComboBox1.Items.BeginUpdate;
ComboBox1.ListBox.ListItems[1].TextSettings.Font.Size := 25;
ComboBox1.ListBox.ListItems[1].StyledSettings := ComboBox1.ListBox.ListItems[1].StyledSettings
- [TStyledSetting.Size];
ComboBox1.ListBox.ListItems[1].TextSettings.FontColor := TAlphaColorRec.Red;
ComboBox1.ListBox.ListItems[1].StyledSettings := ComboBox1.ListBox.ListItems[1].StyledSettings
- [TStyledSetting.ssFontColor];
ComboBox1.Items.EndUpdate;
Kolay gelsin..

Kod ile değilde comboboxsın properties alanından yapmak istiyorum; fakat comboboxsın TextSettings özelliği yok yada ben bulamadım...
Kullanıcı avatarı
fesiharslan
Üye
Mesajlar: 591
Kayıt: 20 Eki 2006 11:37
Konum: Erzurum
İletişim:

Re: Combobox font

Mesaj gönderen fesiharslan »

Merhaba;
Bu konu ile ilgili daha önce sorulan bir soru üzerine makale yazmıştım.
Makalede, mobil platformda yer alan Edit nesnesinin metin boyutunu düzenleme anlatılmıştır.
Aynı şekilde ComboBox için de yapabilirsiniz.

Makale; (Firemonkey (FMX) Nesne Boyutunu (Yükseklik, Genişlik) Yeniden Düzenlemek)
viewtopic.php?f=19&t=35486
Kullanıcı avatarı
brs
Üye
Mesajlar: 626
Kayıt: 04 Eki 2012 03:52

Re: Combobox font

Mesaj gönderen brs »

Buda benden olsun :)

Kod: Tümünü seç

procedure TForm1.FormShow(Sender: TObject);
begin
  for i := 0 to GrupComboBox.Count - 1 do
  begin
    GrupComboBox.ListBox.ListItems[i].TextSettings.Font.Size := 14;
    // GrupComboBox.ListBox.ListItems[i].StyledSettings :=
    // GrupComboBox.ListBox.ListItems[i].StyledSettings - [TStyledSetting.Size];
  end;
end;
İşi bilen yardım eder, az bilen akıl verir, bilmeyen eleştirir, yapamayan ise çamur atar...
Cevapla