[Contents] [Back] [Prev] [Up] [Next] [Forward]

# Package Gtk.Frame

A Gtk_Frame is a simple border than can be added to any widget or group of widget to enhance its visual aspect. Optionally, a frame can have a title.

This is a very convenient widget to visually group related widgets (like groups of buttons for instance), possibly with a title to explain the purpose of this group.

A Gtk_Frame has only one child, so you have to put a container like for instance a Gtk_Box inside if you want the frame to surround multiple widgets.

- Gtk.Frame Widget Hierarchy
- Gtk.Frame Subprograms

## Widget Hierarchy

    GObject                       (see section Package Glib.Object)
    Gtk_Object                    (see section Package Gtk.Object)
       \___ Gtk_Widget            (see section Package Gtk.Widget)
          \___ Gtk_Container      (see section Package Gtk.Container)
             \___ Gtk_Bin         (see section Package Gtk.Bin)
                \___ Gtk_Frame    (see section Package Gtk.Frame)

## Subprograms

    procedure Gtk_New
      (Frame              : out    Gtk_Frame;
       Label              :        UTF8_String := "");

| Create a new frame. If Label is not the empty string, the frame will have a title.

    function Get_Type              return Glib.GType;

| Return the internal value associated with a Gtk_Frame.

    procedure Set_Label
      (Frame              : access Gtk_Frame_Record;
       Label              :        UTF8_String := "");

| Change the label of the frame dynamically. If Label is the empty string, the frame's label is deleted.

    function Get_Label
      (Frame              : access Gtk_Frame_Record)
       return UTF8_String;

| Return the label associated with the frame.

    procedure Set_Label_Widget
      (Frame              : access Gtk_Frame_Record;
       Label_Widget       : access Gtk.Widget.Gtk_Widget_Record'Class);

| Set the label widget for the frame. This is the widget that will appear embedded in the top edge of the frame as a title.

    procedure Set_Label_Align
      (Frame              : access Gtk_Frame_Record;
       Xalign             :        Gfloat := 0.0;
       Yalign             :        Gfloat := 0.0);

| Change the alignment of the title in the frame. Xalign and Yalign are both percents that indicate the exact position of the label relative to the top-left corner of the frame. Note that Yalign is currently ignored, and the label can only be displayed on the top of the frame (0.0 for Xalign means align the label on the left, 1.0 means align the label on the right).

    procedure Get_Label_Align
      (Frame              : access Gtk_Frame_Record;
       Xalign             : out    Gfloat;
       Yalign             : out    Gfloat);

| Return the X and Y alignments of the title in the frame.

    procedure Set_Shadow_Type
      (Frame              : access Gtk_Frame_Record;
       The_Type           :        Gtk_Shadow_Type);

| Change the visual aspect of the frame.

    function Get_Shadow_Type
      (Frame              : access Gtk_Frame_Record)
       return Gtk_Shadow_Type;

| Return the visual aspect of the frame.

[Contents] [Back] [Prev] [Up] [Next] [Forward]