modified: interface/ri_tk.py
modified: interface/ri_tk_cmd.py
This commit is contained in:
@@ -105,13 +105,16 @@ def create_widget_sub(w, p_win):
|
||||
tk_func = getattr(Tkinter, w.tp)
|
||||
w_win = tk_func(p_win, tk_attr)
|
||||
|
||||
# save tk widget instance into w (widget instance)
|
||||
setattr(w, 'tk_widget', w_win)
|
||||
|
||||
# display sub widgets
|
||||
for sub_w in w.widgets:
|
||||
create_widget_sub(sub_w, w_win)
|
||||
|
||||
# process action init
|
||||
if 'action' in dir(w) and 'init' in w.action.dict:
|
||||
getattr(sys.modules['ri_cmd'], w.action.dict['init'])(w_win)
|
||||
getattr(sys.modules['ri_cmd'], w.action.dict['init'])()
|
||||
|
||||
# handle scroll bar for sub_widgets
|
||||
if 'action' in dir(w):
|
||||
@@ -143,8 +146,6 @@ def create_widget_sub(w, p_win):
|
||||
for bd in w.bindings:
|
||||
w_win.bind(bd[0], getattr(ri_cmd, bd[1]))
|
||||
|
||||
# save tk widget instance into w (widget instance)
|
||||
setattr(w, 'tk_widget', w_win)
|
||||
|
||||
return w_win
|
||||
|
||||
|
||||
Reference in New Issue
Block a user