Sayfayı Yazdır | Pencereyi Kapat

TCLMENUFRAME İÇİNE PROBUTTON EKLENMİYOR

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=1116
Tarih: 23 Temmuz 2025 Saat 01:33
Program Versiyonu: Web Wiz Forums 12.07 - https://www.webwizforums.com


Konu: TCLMENUFRAME İÇİNE PROBUTTON EKLENMİYOR
Mesajı Yazan: Ahmet_27
Konu: TCLMENUFRAME İÇİNE PROBUTTON EKLENMİYOR
Mesaj Tarihi: 22 Temmuz 2025 Saat 11:25
  Main_Page_ProButton = Main_Page_Form.AddNewProButton(TstSideMenu.VertScrollBox,'Main_Page_ProButton','Spor');

  Main_Page_ProButton.Align = alLeft;
  
  Main_Page_ProButton.clProSettings.FontColor = clAlphaColor.clHextoColor('#FFFFFF');
  
  Main_Page_ProButton.clProSettings.FontSize = 18;

  Main_Page_ProButton.SetClProSettings(Main_Page_ProButton.clProSettings);
  
  Main_Page_Form.AddNewEvent(Main_Page_ProButton,tbeOnClick, 'GoToUnit1');


Bu kodu yazınca clomosy yazısı ekrana geliyor ve siyah ekran öyle kalıyor. Uygulama açılmıyor.



Cevaplar:
Mesajı Yazan: Sudesigirci
Mesaj Tarihi: 22 Temmuz 2025 Saat 14:07
Merhaba Ahmet ,
Main_Page_Form.Run ekledin mi kodun sonuna yardımcı olmam için kodun tamamını paylaşabilir misin rica etsem ?


Mesajı Yazan: Ahmet_27
Mesaj Tarihi: 22 Temmuz 2025 Saat 14:13
Merhaba
Evet ekledim. Kodun tamamını paylaşamam 1282 satır. 
İlgili yerler şöyle ( Main bloğumun tamamı ve değişkenlerimin tamamı)
Gerçi diğer yerlerin bir önemi yok zaten diğerleri fonksiyon hep.

Var  
  Main_Page_Form, Spor_Page_Form : TclForm;
  
  AppBar_ProPanel, Footer_ProPanel  : TclProPanel;
  
  Main_Page_ProButton, Profil_ProButton, KategoriSec_ProButton, Bilim_ProButton : TClProButton;  
  
  Flow_ListView : TClProListView;
  
  DesignerPanel1 : TClProListViewDesignerPanel;
  
  haber_baslik, haber_icerik, haber_tarih, haber_kategorisi  : TClProLabel;
  
  haber_Img : TclProImage;
  
  clRest : TCLRest;
  
  gelen_xml, mevcut_xml, title_icerik, nihai_baslik, nihai_baslik2, nihai_baslik3, nihai_baslik4, nihai_baslik5: String;
  
  nihai_baslik6, nihai_baslik7, nihai_baslik8, nihai_baslik9, nihai_baslik10 : String;
  
  title_index_baslangic, title_index_son, cift_tirnak_index  : Integer;
  
  Unit1, Unit2 : TclUnit;
  
  TstSideMenu : TclMenuFrame;

{
  Main_Page_Form=TclForm.Create(self);
  
  Main_Page_Form.SetFormColor('#364eb0', '#364eb0', clGVertical);
  
  
  Unit1 = TclUnit.Create;
  Unit2 = TclUnit.Create;
  
  
  // VERİ ÇEKİP İÇİNDEN TİTLE BULMA
  
  clRest=TCLRest.Create;
  clRest.BaseURL = ' https://www.aa.com.tr/tr/rss/default?cat=guncel" rel="nofollow - https://www.aa.com.tr/tr/rss/default?cat=guncel ';
  
  
  // https://www.aa.com.tr/tr/rss/default?cat=spor" rel="nofollow - https://www.aa.com.tr/tr/rss/default?cat=spor çalıştı
  
  // https://www.aa.com.tr/tr/yesilhat/rss/news?cat=dogal-yasam" rel="nofollow - https://www.aa.com.tr/tr/yesilhat/rss/news?cat=dogal-yasam çalıştı
  
  // https://www.aa.com.tr/tr/yesilhat/rss/news?cat=teknoloji " rel="nofollow - https://www.aa.com.tr/tr/yesilhat/rss/news?cat=teknoloji  ; çalışmadı
  
  // https://www.aa.com.tr/tr/yesilhat/rss/news?cat=bilim" rel="nofollow - https://www.aa.com.tr/tr/yesilhat/rss/news?cat=bilim // çalıştı
  
  // https://www.aa.com.tr/tr/rss/default?cat=ekonomi " rel="nofollow - https://www.aa.com.tr/tr/rss/default?cat=ekonomi  ;          çalıştı
  
  // https://www.aa.com.tr/tr/teyithatti/rss/news?cat=gazze " rel="nofollow - https://www.aa.com.tr/tr/teyithatti/rss/news?cat=gazze  ;    ÇALIŞMADI
  
  clRest.Method = rmGET;
  clRest.Accept = 'application/xml';
//  clRest.AddHeader('X-Api-Key', '4c3254a99037421aa0655a048fac1f19'); // Buraya kendi key'ini koy

  GetPostMethod
  title_bul;
  image_bul;
  description_bul;
  pubdate_bul;
  title_bul2;
  image_bul2;
  description_bul2;
  pubdate_bul2;
  
  //APPBAR
  
  
  
  AppBar_ProPanel=Main_Page_Form.AddNewProPanel(Main_Page_Form,'AppBar_ProPanel');
  
  AppBar_ProPanel.Align = alTop;
  
  AppBar_ProPanel.Height = 50;
  
// AppBar_ProPanel.clProSettings.BorderColor = clAlphaColor.clHexToColor('#000000');
  
  AppBar_ProPanel.clProSettings.BackgroundColor = clAlphaColor.clHextoColor('#07b8f2');

//  AppBar_ProPanel.clProSettings.RoundHeight = 10;

//  AppBar_ProPanel.clProSettings.RoundWidth = 10;

//  AppBar_ProPanel.clProSettings.BorderWidth = 2;
  
//  AppBar_ProPanel.clProSettings.IsFill = True;  
  
//AppBar_ProPanel.clProSettings.IsRound = True;
  
  AppBar_ProPanel.SetclProSettings(AppBar_ProPanel.clProSettings);
  
  
  
  // appbar içinde haber kategorisi
  
  haber_kategorisi = Main_Page_Form.AddNewProLabel(AppBar_ProPanel, 'haber_kategorisi', 'Kategori: Güncel Haberler');
  
  haber_kategorisi.clProSettings.FontSize = 25;
//  haber_kategorisi.Align = alCenter;
  haber_kategorisi.Width = 300;
  haber_kategorisi.Margins.Left = 30;
  haber_kategorisi.Margins.Top = 25;
  haber_kategorisi.Height = 50;
  haber_kategorisi.clProSettings.TextSettings.Font.Style = [fsBold];
  haber_kategorisi.clProSettings.FontColor = clAlphaColor.clHexToColor('#FFFFFF');
//  haber_kategorisi.clProSettings.BackgroundColor = clAlphaColor.clHexToColor('#07b8f2');
  
  haber_kategorisi.SetClProSettings(haber_kategorisi.clProSettings);
  
  
  
  // Footer
  
  Footer_ProPanel = Main_Page_Form.AddNewProPanel(Main_Page_Form,'Footer_ProPanel');
  
  Footer_ProPanel.Align = alBottom;
  
  Footer_ProPanel.Height = 55;  
  
  Footer_ProPanel.clProSettings.BackgroundColor = clAlphaColor.clHextoColor('#07b8f2');
  
  Footer_ProPanel.SetclProSettings(Footer_ProPanel.clProSettings);
  

  
  
  // Ana Sayfa Butonu
  
//  Main_Page_ProButton= Main_Page_Form.AddNewProButton(TstSideMenu.VertScrollBox,'Main_Page_ProButton','Spor');

  Main_Page_ProButton = Main_Page_Form.AddNewProButton(Footer_ProPanel, 'Main_Page_ProButton', 'Spor');

  Main_Page_ProButton.Align = alLeft;
  
  Main_Page_ProButton.clProSettings.FontColor = clAlphaColor.clHextoColor('#FFFFFF');
  
  Main_Page_ProButton.clProSettings.FontSize = 18;

  Main_Page_ProButton.SetClProSettings(Main_Page_ProButton.clProSettings);
  
  Main_Page_Form.AddNewEvent(Main_Page_ProButton,tbeOnClick, 'GoToUnit1');
  
  // Profil Button
  
  Profil_ProButton = Main_Page_Form.AddNewProButton(Footer_ProPanel, 'Profil_ProButton', 'Ekonomi');

  Profil_ProButton.Align = alLeft;
  
  Profil_ProButton.clProSettings.FontColor = clAlphaColor.clHextoColor('#FFFFFF');
  
  Profil_ProButton.clProSettings.FontSize = 18;

  Profil_ProButton.SetClProSettings(Profil_ProButton.clProSettings);
  
  Main_Page_Form.AddNewEvent(Profil_ProButton,tbeOnClick, 'GoToUnit2');
  
  
  // Bilim kategorisi butonu
  
  Bilim_ProButton = Main_Page_Form.AddNewProButton(Footer_ProPanel, 'Bilim_ProButton', 'Bilim');

  Bilim_ProButton.Align = alLeft;
  
  Bilim_ProButton.clProSettings.FontColor = clAlphaColor.clHextoColor('#FFFFFF');
  
  Bilim_ProButton.clProSettings.FontSize = 18;

  Bilim_ProButton.SetClProSettings(Bilim_ProButton.clProSettings);
  
  Main_Page_Form.AddNewEvent(Bilim_ProButton,tbeOnClick, 'GoToUnit3');
  
  
  
  // Kategori Menü aç
  
  KategoriSec_ProButton = Main_Page_Form.AddNewProButton(Footer_ProPanel, 'KategoriSec_ProButton', 'Kategori Seç');

  KategoriSec_ProButton.Align = alLeft;
  
  KategoriSec_ProButton.clProSettings.FontColor = clAlphaColor.clHextoColor('#FFFFFF');
  
  KategoriSec_ProButton.clProSettings.FontSize = 18;

  KategoriSec_ProButton.SetClProSettings(KategoriSec_ProButton.clProSettings);
  
  Main_Page_Form.AddNewEvent(KategoriSec_ProButton,tbeOnClick, 'ShowMenuFrame');
  
  
//  Profil_ProButton.OnClick = sayfayiYenile; 
  
  

  
  // Haber Akışı İçin Listview
  
  Flow_ListView = Main_Page_Form.AddNewProListView(Main_Page_Form,'Flow_ListView');

  Flow_ListView.Align = AlClient;
  
  Flow_ListView.clProSettings.ViewType = lvIcon;
  
  Flow_ListView.clProSettings.ColCount = 1;  // tek sütun yani her satırda tek öge 2 sütun olsa 2 öge olur.
  
  Flow_ListView.clProSettings.ItemSpace = 3;
  
//  Flow_ListView.Margins.Bottom = 1;
//  Flow_ListView.Margins.Top = 1;
//  Flow_ListView.Margins.Right = 1;
//  Flow_ListView.Margins.Left = 1;
  
 // Flow_ListView.clProSettings.BackgroundColor = clAlphaColor.clHexToColor('#FFFCFF');
  
 // Flow_ListView.clProSettings.BorderColor = clAlphaColor.clHexToColor('#f6041c');
  
//  Flow_ListView.clProSettings.BorderWidth = 5;
  
//  Flow_ListView.clProSettings.RoundHeight = 5;
  
//  Flow_ListView.clProSettings.RoundWidth = 5;
  
  
  Flow_ListView.clProSettings.ItemHeight = 700; // her bir öğenin boyutu
//  Flow_ListView.clProSettings.ItemSpace = 10;


  CreateDesignerPanel;
  CreateData;
  AddDataToListView;

  
  
  Flow_ListView.SetclProSettings(Flow_ListView.clProSettings);
  
  
  
 // Myhttp = TclHttp.Create(Nil);
  
 // getClick();
 
 
 // TclMenuFrame
 
 TstSideMenu = Main_Page_Form.AddNewMenuFrame(Main_Page_Form,'TstSideMenu');
 TstSideMenu.Align = alContents;
 TstSideMenu.Margins.Top = 50;
 TstSideMenu.MenuBar.Width = 250;
 TstSideMenu.Visible = False;
 TstSideMenu.ClMenuPosition = clLeft;
 
 
 


 
  Main_Page_Form.Run;
  
}


Mesajı Yazan: Ahmet_27
Mesaj Tarihi: 22 Temmuz 2025 Saat 14:19
//  Main_Page_ProButton= Main_Page_Form.AddNewProButton(TstSideMenu.VertScrollBox,'Main_Page_ProButton','Spor');

şu an hata almamak için yaptığım kodu atmışım.

hatayı bu satırı yorum satırından kaldırıp bunun bir altındakinin yorum satırına aldığımda hata alıyorum


Mesajı Yazan: Sudesigirci
Mesaj Tarihi: 22 Temmuz 2025 Saat 14:43
menüyü butondan önce oluşturup şu kısmı TstSideMenu.Visible = True; yaparak tekrar deneyebilir misin ?

iyi çalışmalar dilerim


Mesajı Yazan: Ahmet_27
Mesaj Tarihi: 22 Temmuz 2025 Saat 14:55
Oldu teşekkür ederim. sana da iyi çalışmalar.



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