aboutsummaryrefslogtreecommitdiffstats
path: root/ext/tk/lib/tkextlib/bwidget/combobox.rb
diff options
context:
space:
mode:
Diffstat (limited to 'ext/tk/lib/tkextlib/bwidget/combobox.rb')
-rw-r--r--ext/tk/lib/tkextlib/bwidget/combobox.rb13
1 files changed, 12 insertions, 1 deletions
diff --git a/ext/tk/lib/tkextlib/bwidget/combobox.rb b/ext/tk/lib/tkextlib/bwidget/combobox.rb
index 1c58a4ccb0..16143dfbc6 100644
--- a/ext/tk/lib/tkextlib/bwidget/combobox.rb
+++ b/ext/tk/lib/tkextlib/bwidget/combobox.rb
@@ -21,7 +21,12 @@ class Tk::BWidget::ComboBox
TkCommandNames = ['ComboBox'.freeze].freeze
WidgetClassName = 'ComboBox'.freeze
- WidgetClassNames[WidgetClassName] = self
+ WidgetClassNames[WidgetClassName] ||= self
+
+ def __boolval_optkeys
+ super() << 'autocomplete' << 'autopost'
+ end
+ private :__boolval_optkeys
def get_listbox(&b)
win = window(tk_send_without_enc('getlistbox'))
@@ -35,6 +40,12 @@ class Tk::BWidget::ComboBox
win
end
+ def clear_value
+ tk_send_without_enc('clearvalue')
+ self
+ end
+ alias clearvalue clear_value
+
def icursor(idx)
tk_send_without_enc('icursor', idx)
end