Class: Gtk::ComboBox
- Inherits:
-
Object
- Object
- Gtk::ComboBox
- Defined in:
- lib/gtk_paradise/core_classes/combo_box.rb
Overview
Gtk::ComboBox
Instance Method Summary collapse
-
#fill(i) ⇒ Object
# === fill.
-
#populate_with(*i) ⇒ Object
(also: #populate, #populate_with_this_dataset, #populate_with_this_array, #fill_with)
# === populate_with.
-
#selected? ⇒ Boolean
(also: #selection?)
# === selected? ========================================================================= #.
Instance Method Details
#fill(i) ⇒ Object
#
fill
This method can be used to pass an Array for filling the combo-box at hand.
#
64 65 66 67 68 69 70 |
# File 'lib/gtk_paradise/core_classes/combo_box.rb', line 64 def fill(i) if i.is_a? Array i.each {|entry| fill(entry) } else append_text(i) end end |
#populate_with(*i) ⇒ Object Also known as: populate, populate_with_this_dataset, populate_with_this_array, fill_with
#
populate_with
This method can be used to populate (or re-populate) a combo-box with text entries.
#
24 25 26 27 28 |
# File 'lib/gtk_paradise/core_classes/combo_box.rb', line 24 def populate_with(*i) i.flatten.compact.each {|entry| append(entry) } end |
#selected? ⇒ Boolean Also known as: selection?
#
selected?
#
86 87 88 |
# File 'lib/gtk_paradise/core_classes/combo_box.rb', line 86 def selected? active_text end |