2013-08-29 3 views
0

Gtkada가있는 Ada의 HMI에서 작업 중이며 수직 구분 기호 (Gtk_Vseparator)를 만들고 싶지만 표시되지 않습니다. 정렬에 단추를 추가 할 때 정렬에 배치했지만 분리 기호를 추가하면 왜 그런지 알 수 없습니다.Gtkada 수직 구분 기호가 표시되지 않습니다.

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; 

답변

3

Vseparator는 최소 원하는 높이가 없습니다 :

여기 내 코드입니다. , SSCCE로 코드를 게시하시기 바랍니다

Gtk_New (Alignment_2, 0.5, 0.5, 0.0, 1.0); 

그런데 : 따라서, 당신은 당신이 사용할 수있는 모든 수직 공간을 사용한다는 것을 그것을에 배치 정렬을 알려야합니다. 멀리 begin 등 스트립 멀리 코드를 읽을 수 있도록하지 않습니다.

+0

고맙습니다. 이제 작동합니다. 그리고 저는 SSCCE를 사용할 것입니다 :) – Teodoro

관련 문제