diff options
Diffstat (limited to 'ext/tk/lib/tkentry.rb')
-rw-r--r-- | ext/tk/lib/tkentry.rb | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/ext/tk/lib/tkentry.rb b/ext/tk/lib/tkentry.rb index 7af3f26748..f301bbdace 100644 --- a/ext/tk/lib/tkentry.rb +++ b/ext/tk/lib/tkentry.rb @@ -55,8 +55,12 @@ class TkEntry<TkLabel end end - def create_self - tk_call 'entry', @path + def create_self(keys) + if keys and keys != None + tk_call 'entry', @path, *hash_kv(keys) + else + tk_call 'entry', @path + end end def bbox(index) @@ -191,8 +195,12 @@ class TkSpinbox<TkEntry WidgetClassName end - def create_self - tk_call 'spinbox', @path + def create_self(keys) + if keys and keys != None + tk_call 'spinbox', @path, *hash_kv(keys) + else + tk_call 'spinbox', @path + end end def identify(x, y) |