Class: Gtk::BottomLeftPlacement
- Defined in:
- lib/gtk_paradise/examples/gtk3/078_bottom_left_placement.rb
Instance Method Summary collapse
-
#initialize ⇒ BottomLeftPlacement
constructor
# === initialize ========================================================================= #.
Methods inherited from Box
#add_space, #left_aligned_text, #text
Constructor Details
#initialize ⇒ BottomLeftPlacement
#
initialize
#
18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 |
# File 'lib/gtk_paradise/examples/gtk3/078_bottom_left_placement.rb', line 18 def initialize super(:vertical) set_border_width(6) listbox = ::Gtk::ListBox.new _ = ::Gtk::ListBoxRow.new mini_hbox = ::Gtk::Box.new(:horizontal) mini_hbox.add(::Gtk::Label.new('HEY 3 ')) mini_hbox.add(::Gtk::Button.new(label: 'HEY 3')) _.add(mini_hbox) listbox.add(_) listbox.activate_on_single_click = false pack_start(listbox, expand: true, fill: true, padding: 10) alignment = ::Gtk::Alignment.new(0, 1, 0, 0) label = ::Gtk::Label.new('bottom-left') alignment.add(label) pack_start(alignment, expand: true, fill: true, padding: 10) alignment = ::Gtk::Alignment.new(0.85, 1, 0, 0) # Place right. label = ::Gtk::Label.new('bottom-right') alignment.add(label) pack_start(alignment, expand: true, fill: true, padding: 10) show_all end |