diff -ur v6/wx_ut.py v7/wx_ut.py --- v6/wx_ut.py 2020-07-18 23:26:30.000000000 +0900 +++ v7/wx_ut.py 2020-10-01 20:03:50.000000000 +0900 @@ -104,8 +104,8 @@ wx.PostEvent( obj, ev ) -def new(title, init, fini=None, args=None): - e = empty.new( app=None, frame=None, args=args ) +def new(title, init, fini=None, args=None, on_init=None): + e = empty.new( app=None, frame=None, args=args, on_init=on_init ) newed_objs = {} @@ -339,7 +339,11 @@ e.frame.Layout() e.frame.Fit() e.app.SetTopWindow( e.frame ) - e.frame.Show() + + if e.on_init: + e.on_init( e ) + else: + e.frame.Show() return 1 def poll_start(poll_func, sec, hz, gc):