summaryrefslogtreecommitdiff
path: root/ext/tk/lib/tkextlib/tile/tnotebook.rb
diff options
context:
space:
mode:
Diffstat (limited to 'ext/tk/lib/tkextlib/tile/tnotebook.rb')
-rw-r--r--ext/tk/lib/tkextlib/tile/tnotebook.rb18
1 files changed, 13 insertions, 5 deletions
diff --git a/ext/tk/lib/tkextlib/tile/tnotebook.rb b/ext/tk/lib/tkextlib/tile/tnotebook.rb
index d02e05b211..9e27e2c1fd 100644
--- a/ext/tk/lib/tkextlib/tile/tnotebook.rb
+++ b/ext/tk/lib/tkextlib/tile/tnotebook.rb
@@ -13,9 +13,6 @@ module Tk
end
end
-Tk.__set_toplevel_aliases__(:Ttk, Tk::Tile::Notebook, :TkNotebook)
-
-
class Tk::Tile::TNotebook < TkWindow
################################
include TkItemConfigMethod
@@ -46,8 +43,11 @@ class Tk::Tile::TNotebook < TkWindow
alias tabconfiginfo itemconfiginfo
alias current_tabconfiginfo current_itemconfiginfo
+ def tabcget_tkstring(tagOrId, option)
+ tk_split_simplelist(tk_call_without_enc(*(__item_confinfo_cmd(tagid(tagOrId)) << "-#{option}")), false, true)[-1]
+ end
def tabcget_strict(tagOrId, option)
- tabconfigure(tagOrId, option)[-1]
+ tabconfiginfo(tagOrId, option)[-1]
end
def tabcget(tagOrId, option)
unless TkItemConfigMethod.__IGNORE_UNKNOWN_CONFIGURE_OPTION__
@@ -80,7 +80,7 @@ class Tk::Tile::TNotebook < TkWindow
TkCommandNames = ['::tnotebook'.freeze].freeze
end
WidgetClassName = 'TNotebook'.freeze
- WidgetClassNames[WidgetClassName] = self
+ WidgetClassNames[WidgetClassName] ||= self
def self.style(*args)
[self::WidgetClassName, *(args.map!{|a| _get_eval_string(a)})].join('.')
@@ -111,6 +111,10 @@ class Tk::Tile::TNotebook < TkWindow
self
end
+ def hide(idx)
+ tk_send('hide', idx)
+ end
+
def index(idx)
number(tk_send('index', idx))
end
@@ -137,3 +141,7 @@ class Tk::Tile::TNotebook < TkWindow
list(tk_send('tabs'))
end
end
+
+#Tk.__set_toplevel_aliases__(:Ttk, Tk::Tile::Notebook, :TkNotebook)
+Tk.__set_loaded_toplevel_aliases__('tkextlib/tile/tnotebook.rb',
+ :Ttk, Tk::Tile::Notebook, :TkNotebook)