Sayfayı Yazdır | Pencereyi Kapat

Buton Text'i Hakkında

Nereden Yazdırıldığı: Clomosy | Forum
Kategori: Genel Programlama
Forum Adı: Genel İşlemler
Forum Tanımlaması: TRObject dili ile programlama yaparken karşılaşılan genel işlemler
URL: https://forum.clomosy.com.tr/forum_posts.asp?TID=947
Tarih: 04 Ocak 2025 Saat 11:48
Program Versiyonu: Web Wiz Forums 12.07 - https://www.webwizforums.com


Konu: Buton Text'i Hakkında
Mesajı Yazan: NadireNurSaglam
Konu: Buton Text'i Hakkında
Mesaj Tarihi: 25 Ekim 2024 Saat 16:48
Aşağıdaki kodumda buton oluşturuluyor. Ama addnewprobutton kısmında 3. parametre olan buton text'i butonun üzerine yazdırılmıyor:

function addbtn(GelenForm,konum,butonIsim,btnText, bgDeger,
bottomDeger,rightDeger,leftDeger,topDeger,HeightDeger,widthDeger,rhdeger,rwDeger,
fontClrDeger,brdrClrDeger): TClProButton;
var
  Btn : TClProButton;
begin

  Btn := GelenForm.AddNewProButton(konum,butonIsim,btnText);
  with Btn do
  begin
    //Align:= alignDeger;
    //caption:=btnText;
    Margins.Bottom := bottomDeger;
    Margins.Right := rightDeger;
    Margins.Left := leftDeger;
    Margins.Top := topDeger;
    Height := HeightDeger;
    //clprosettings.FontVertAlign := fontvertDeger;
   // clprosettings.fontHorzAlign := fonthorzDeger;
    clprosettings.RoundHeight :=rhdeger;
    clprosettings.RoundWidth := rwDeger;
    //clprosettings.FontSize := fontSizeDeger;
  end;
  //----------------------------------------------------------------------------
  if(bgDeger = '') then
  begin
    Btn.clProSettings.BackgroundColor:=clAlphaColor.clnull;
  end else
  begin
    Btn.clProSettings.BackgroundColor:=clAlphaColor.clHexToColor(bgDeger);
  end;
  //----------------------------------------------------------------------------
  if(fontClrDeger = '') then
  begin
    Btn.clProSettings.FontColor:=clAlphaColor.clnull;
  end else
  begin
    Btn.clProSettings.FontColor:=clAlphaColor.clHexToColor(fontClrDeger);
  end;
  //----------------------------------------------------------------------------
  if(brdrClrDeger = '') then
  begin
    Btn.clProSettings.FontColor:=clAlphaColor.clnull;
  end else
  begin
    Btn.clProSettings.FontColor:=clAlphaColor.clHexToColor(brdrClrDeger);
  end;
  //----------------------------------------------------------------------------
  
  Btn.SetclProSettings(Btn.clProSettings);
  Result := Btn;
end;



Cevaplar:
Mesajı Yazan: Developer
Mesaj Tarihi: 25 Ekim 2024 Saat 17:10
Merhaba Nadire,
Aşağıdaki kodu alarak tekrar dener misiniz:
function addbtn(GelenForm,konum,butonIsim,btnText, bgDeger,
bottomDeger,rightDeger,leftDeger,topDeger,HeightDeger,widthDeger,rhdeger,rwDeger,
fontClrDeger,brdrClrDeger): TClProButton;
var
  Btn : TClProButton;
begin

  Btn := GelenForm.AddNewProButton(konum,butonIsim,btnText);
  with Btn do
  begin
    //Align:= alignDeger;
    //caption:=btnText;
    Margins.Bottom := bottomDeger;
    Margins.Right := rightDeger;
    Margins.Left := leftDeger;
    Margins.Top := topDeger;
    Height := HeightDeger;
    //clprosettings.FontVertAlign := fontvertDeger;
   // clprosettings.fontHorzAlign := fonthorzDeger;
    clprosettings.RoundHeight :=rhdeger;
    clprosettings.RoundWidth := rwDeger;
    //clprosettings.FontSize := fontSizeDeger;
  end;
  //----------------------------------------------------------------------------
  if(bgDeger = '') then
  begin
    Btn.clProSettings.BackgroundColor:=clAlphaColor.clwhite;
  end else
  begin
    Btn.clProSettings.BackgroundColor:=clAlphaColor.clHexToColor(bgDeger);
  end;
  //----------------------------------------------------------------------------
  if(fontClrDeger = '') then
  begin
    Btn.clProSettings.FontColor:=clAlphaColor.clblack;
  end else
  begin
    Btn.clProSettings.FontColor:=clAlphaColor.clHexToColor(fontClrDeger);
  end;
  //----------------------------------------------------------------------------
  if(brdrClrDeger = '') then
  begin
    Btn.clProSettings.FontColor:=clAlphaColor.clblack;
  end else
  begin
    Btn.clProSettings.FontColor:=clAlphaColor.clHexToColor(brdrClrDeger);
  end;
  //----------------------------------------------------------------------------
  
  Btn.SetclProSettings(Btn.clProSettings);
 
  Result := Btn;
end; 



Sayfayı Yazdır | Pencereyi Kapat

Forum Software by Web Wiz Forums® version 12.07 - https://www.webwizforums.com
Copyright ©2001-2024 Web Wiz Ltd. - https://www.webwiz.net