使用Gtkada创建选项卡
我正在尝试用Gtkada在Ada中设置HMI,我希望有选项卡(Gtk语言的笔记本) 我没有找到很多关于Gtkada的文档,这是我写的,但它不起作用,你知道为什么吗?只有一扇简单的灰色窗户开着使用Gtkada创建选项卡,gtk,ada,Gtk,Ada,我正在尝试用Gtkada在Ada中设置HMI,我希望有选项卡(Gtk语言的笔记本) 我没有找到很多关于Gtkada的文档,这是我写的,但它不起作用,你知道为什么吗?只有一扇简单的灰色窗户开着 with Gtk.Main; use Gtk.Main; with Gtk.Window; use Gtk.Window; with Gtk.Enums; use Gtk.Enums; with Gtk.Notebook; use Gtk.Notebook; with Gtk.Bu
with Gtk.Main; use Gtk.Main;
with Gtk.Window; use Gtk.Window;
with Gtk.Enums; use Gtk.Enums;
with Gtk.Notebook; use Gtk.Notebook;
with Gtk.Button; use Gtk.Button;
with Gtk.Label; use Gtk.Label;
procedure IHM is
Win : Gtk_Window;
Notebook : Gtk_Notebook;
GenerationButton : Gtk_Button;
Label_Generation : Gtk_Label;
begin
Init;
Gtk_New (Win, Window_Toplevel);
Gtk_New (GenerationButton);
Gtk_New (Notebook);
Gtk_New (Label_Generation, "Generation");
Notebook.Append_Page (GenerationButton, Label_Generation);
Win.Set_Title ("Generator");
Win.Set_Default_Size (1200, 800);
Win.Set_Position (Win_Pos_Center);
Win.Add (Notebook);
Win.Show;
Main;
end IHM;
将
Win.Show
替换为Win.Show\u All
<代码>显示不是递归的,不会告诉笔记本显示。或者,您可以添加Notebook.Show
用Win.Show
替换Win.Show
<代码>显示不是递归的,不会告诉笔记本显示。或者,您可以添加笔记本。显示