未显示Gtkada垂直分隔符
我正在用Gtkada在Ada中开发HMI,我想创建一个垂直分隔符(Gtk_Vseparator),但它没有显示出来。我把它放在一条路线上,当我在路线上添加一个按钮时,它会出现,但当我添加分隔符时,它不会出现,我不知道为什么 这是我的密码:未显示Gtkada垂直分隔符,gtk,ada,Gtk,Ada,我正在用Gtkada在Ada中开发HMI,我想创建一个垂直分隔符(Gtk_Vseparator),但它没有显示出来。我把它放在一条路线上,当我在路线上添加一个按钮时,它会出现,但当我添加分隔符时,它不会出现,我不知道为什么 这是我的密码: Win : Gtk_Window; Notebook : Gtk_Notebook; Notebook_Label : Gtk_Label; Box_0
Win : Gtk_Window;
Notebook : Gtk_Notebook;
Notebook_Label : Gtk_Label;
Box_0 : Gtk_Vbox;
Alignment_1 : Gtk_Alignment;
Generate_Button : Gtk_Button;
Box_1 : Gtk_Hbox;
Box_2_Add : Gtk_Vbox;
Alignment_2 : Gtk_Alignment;
Add_Delete_Separator : Gtk_Vseparator;
Box_2_Delete : Gtk_Vbox;
Init;
Gtk_New (Win, Window_Toplevel);
Gtk_New (Notebook);
Gtk_New (Notebook_Label, "Generation");
Gtk_New_Vbox (Box_0, Homogeneous => False, Spacing => 20);
Gtk_New (Alignment_1, 0.5, 0.5, 0.0, 0.0);
Gtk_New (Generate_Button, "Generate model");
Gtk_New_Hbox (Box_1, Homogeneous => False);
Gtk_New_Vbox (Box_2_Add, Homogeneous => False);
Gtk_New (Alignment_2, 0.5, 0.5, 0.0, 0.0);
Gtk_New_Vseparator (Add_Delete_Separator);
Gtk_New_Vbox (Box_2_Delete, Homogeneous => False);
Add_Delete_Separator.Show;
Alignment_2.Add (Add_Delete_Separator);
Box_1.Pack_End (Box_2_Add, Expand => True, Fill => True);
Box_1.Pack_End (Alignment_2, Expand => True, Fill => True);
Box_1.Pack_End (Box_2_Delete, Expand => True, Fill => True);
Alignment_1.Add (Generate_Button);
Box_0.Pack_End (Box_1, Expand => True, Fill => True);
Box_0.Pack_End (Alignment_1, Expand => False, Fill => True);
Notebook.Append_Page (Box_0, Notebook_Label);
Win.Set_Title ("Generator");
Win.Set_Default_Size (1200, 800);
Win.Set_Position (Win_Pos_Center);
Win.Add (Notebook);
Win.Show_All;
Main;
Vseparator
没有所需的最小高度。因此,您需要告知路线的放置位置,路线应使用所有可用的垂直空间:
Gtk_New (Alignment_2, 0.5, 0.5, 0.0, 1.0);
顺便说一句,请将您的代码发布为。剥离begin
等不会使代码更具可读性