## -remove bottom frame -##
root_window.tk.call('grid','forget','.pane.top')

root_window.tk.call('grid','forget','.pane.bottom')
root_window.tk.call('grid','forget','.info')

#root_window.tk.call('pack','forget','.pane.bottom.t.sb')
#root_window.tk.call('grid','.pane.bottom','-column','0','-row','1','-sticky','nesw')


###  pack something under gcode  #######
###root_window.tk.call('grid','.pane.button','-column','1','-row','2','-sticky','nw')

###add common frame beside t.test
root_window.tk.call('frame','.pane.button')
root_window.tk.call('grid','.pane.button','-column','1','-row','5','-padx','5','-pady','5')
#root_window.tk.call('grid','columnconfigure','.pane.button','0','-weight','1')



#W('button','.pane.button.srch_btn','-text','search')
#W('button','.pane.button.scrl_up','-text','^','-command','select_next')
#W('button','.pane.button.scrl_dwn','-text','V','-command','select_prev')



root_window.tk.call('button','.pane.button.srch_btn')

root_window.tk.call('button','.pane.button.man')
root_window.tk.call('button','.pane.button.mdi')
root_window.tk.call('button','.pane.button.auto')
root_window.tk.call('button','.pane.button.preview')
root_window.tk.call('button','.pane.button.offset')
root_window.tk.call('button','.pane.button.tool')
root_window.tk.call('button','.pane.button.probe')


#srch
root_window.tk.call(".pane.button.srch_btn","configure"
,"-image",""
,"-text","SEARCH"
,"-activebackground","lightgrey"
,"-background","darkgrey"
,"-borderwidth","5"
,"-font","mono 12 bold"
,"-height","2"
,"-width","6"
,"-highlightthickness", 1
,"-highlightcolor","black"
,"-highlightbackground","darkgrey"
,"-takefocus",0
,"-padx",5
,"-pady",5
,"-relief","flat"
);


#manual
root_window.tk.call(".pane.button.man","configure"
,"-image",""
,"-text","MANUAL"
,"-activebackground","green"
,"-background","darkgrey"
,"-borderwidth","5"
,"-font","mono 12 bold"
,"-height","2"
,"-width","6"
,"-highlightthickness", 1
,"-highlightcolor","black"
,"-highlightbackground","darkgrey"
,"-takefocus",0
,"-padx",5
,"-pady",5
,"-relief","flat"
);


#MDI
root_window.tk.call(".pane.button.mdi","configure"
,"-image",""
,"-text","MDI"
,"-activebackground","lightgrey"
,"-background","darkgrey"
,"-borderwidth","5"
,"-font","mono 12 bold"
,"-height","2"
,"-width","6"
,"-highlightthickness", 1
,"-highlightcolor","black"
,"-highlightbackground","darkgrey"
,"-takefocus",0
,"-padx",5
,"-pady",5
,"-relief","flat"
);

#auto
root_window.tk.call(".pane.button.auto","configure"
,"-image",""
,"-text","AUTO"
,"-activebackground","lightgrey"
,"-background","darkgrey"
,"-borderwidth","5"
,"-font","mono 12 bold"
,"-height","2"
,"-width","6"
,"-highlightthickness", 1
,"-highlightcolor","black"
,"-highlightbackground","darkgrey"
,"-takefocus",0
,"-padx",5
,"-pady",5
,"-relief","flat"
);

#preview
root_window.tk.call(".pane.button.preview","configure"
,"-image",""
,"-text","PREVIEW"
,"-activebackground","lightgrey"
,"-background","darkgrey"
,"-borderwidth","5"
,"-font","mono 12 bold"
,"-height","2"
,"-width","6"
,"-highlightthickness", 1
,"-highlightcolor","black"
,"-highlightbackground","darkgrey"
,"-takefocus",0
,"-padx",5
,"-pady",5
,"-relief","flat"
);

#offset
root_window.tk.call(".pane.button.offset","configure"
,"-image",""
,"-text","OFFSET"
,"-activebackground","lightgrey"
,"-background","darkgrey"
,"-borderwidth","5"
,"-font","mono 12 bold"
,"-height","4"
,"-width","6"
,"-highlightthickness", 1
,"-highlightcolor","black"
,"-highlightbackground","darkgrey"
,"-takefocus",0
,"-padx",5
,"-pady",5
,"-relief","flat"
);


#tool
root_window.tk.call(".pane.button.tool","configure"
,"-image",""
,"-text","TOOL"
,"-activebackground","lightgrey"
,"-background","darkgrey"
,"-borderwidth","5"
,"-font","mono 12 bold"
,"-height","2"
,"-width","6"
,"-highlightthickness", 1
,"-highlightcolor","black"
,"-highlightbackground","darkgrey"
,"-takefocus",0
,"-padx",5
,"-pady",5
,"-relief","flat"
);

#probe
root_window.tk.call(".pane.button.probe","configure"
,"-image",""
,"-text","PROBE"
,"-activebackground","lightgrey"
,"-background","darkgrey"
,"-borderwidth","5"
,"-font","mono 12 bold"
,"-height","2"
,"-width","6"
,"-highlightthickness", 1
,"-highlightcolor","black"
,"-highlightbackground","darkgrey"
,"-takefocus",0
,"-padx",5
,"-pady",5
,"-relief","flat"
);




#root_window.tk.call('pack','.pane.button','-side','bottom','-fill','x')
root_window.tk.call('pack','.pane.button.srch_btn','-side','left','-fill','x','-padx','1')
root_window.tk.call('pack','.pane.button.man','-side','left','-fill','x','-padx','1')
root_window.tk.call('pack','.pane.button.mdi','-side','left','-fill','x','-padx','1')
root_window.tk.call('pack','.pane.button.auto','-side','left','-fill','x','-padx','1')
root_window.tk.call('pack','.pane.button.preview','-side','left','-fill','x','-padx','1')
root_window.tk.call('pack','.pane.button.offset','-side','left','-fill','x','-padx','1')
root_window.tk.call('pack','.pane.button.tool','-side','left','-fill','x','-padx','1')
root_window.tk.call('pack','.pane.button.probe','-side','left','-fill','x','-padx','1')


#root_window.tk.call('grid','.pane.button.srch_btn','-column','1','-row','1','-sticky','ne')



####  repack bottom ####
root_window.tk.call('grid','.pane.top')

#root_window.tk.call('pack','.pane.bottom.t.sb','-fill','y','-side','left')
root_window.tk.call('grid','.pane.bottom')

#root_window.tk.call('pack','.pane.bottom.t.text','-fill','both','-expand','1','-side','left')
########## resize bottom pane #######
root_window.tk.call('.pane','paneconfigure','.pane.top',"-stretch","always","-height","350");

root_window.tk.call('.pane','paneconfigure','.pane.bottom',"-stretch","never","-height","150");
root_window.tk.call('.pane','paneconfigure','.pane.button',"-stretch","never","-height","50");
