打印本文 打印本文 关闭窗口 关闭窗口
如何使用wxPython设计gui
作者:武汉SEO闵涛  文章来源:敏韬网  点击数6202  更新时间:2006/7/27  文章录入:mintao  责任编辑:mintao
sp;     w2=self.idc_splitter_twobar.GetWindow2()
        assert(w2)
       
        s=self.idc_splitter_twobar.GetSplitMode()
       
        #some error
        self.idc_splitter_twobar.Unsplit() #have to , see document
        w1.Show(True) # when unsplitting , one pane hide , now we show them
        w2.Show(True)
        if s==wxSPLIT_VERTICAL:
            self.idc_splitter_twobar.SplitHorizontally(w1,w2)
        elif s==wxSPLIT_HORIZONTAL:
            self.idc_splitter_twobar.SplitVertically(w1,w2)
        else:
            assert(0)
#----- Message Map and Event Handler ----- end            
      
if __name__=="__main__":
    app = myApp(0)
    app.MainLoop()
------------------------main.py-----------------------end


------------------------main.xrc-----------------------begin
<?xml version="1.0" encoding="ISO-8859-1"?>
<resource version="2.3.0.1">
  <object class="wxFrame" name="idf_main">
    <centered>1</centered>
    <style>wxDEFAULT_FRAME_STYLE</style>
    <title>IDL Job Manager</title>
    <object class="wxBoxSizer">
      <orient>wxHORIZONTAL</orient>
      <object class="sizeritem">
        <object class="wxSplitterWindow" name="idc_main_splitter">
          <object class="wxSplitterWindow" name="idc_splitter_twobar">
            <orientation>vertical</orientation>
            <minsize>1</minsize>
            <style>wxSP_3D|wxSP_BORDER</style>
            <object class="wxNotebook" name="idc_twobar_leftbar">
              <usenotebooksizer>1</usenotebooksizer>
              <object class="notebookpage">
                <label>Jobs</label>
                <object class="wxPanel" name="idc_leftbar_jobs">
                  <style>wxTAB_TRAVERSAL</style>
                  <object class="wxBoxSizer">
                    <orient>wxVERTICAL</orient>
                    <object class="sizeritem">
                      <object class="wxListCtrl" name="idc_jobs_list1">
                        <style>wxLC_REPORT</style>
                      </object>
                      <option>1</option>
                      <flag>wxEXPAND</flag>
                    </object>
                  </object>
                </object>
                <selected>1</selected>
              </object>
              <object class="notebookpage">
                <label>Hosts</label>
                <object class="wxPanel" name="idc_leftbar_hosts">
                  <style>wxTAB_TRAVERSAL</style>
                  <object class="wxBoxSizer">
                    <orient>wxVERTICAL</orient>
                    <object class="sizeritem">
                      <object class="wxListCtrl" name="idc_hosts_list1">
                        <style>wxLC_REPORT</style>
                      </object>
                      <option>1</option>
                      <flag>wxEXPAND</flag>
                    </object>
                  </object>
                </object>
              </object>
            </object>
            <object class="wxNotebook" name="idc_twobar_rightbar">
              <usenotebooksizer>1</usenotebooksize

上一页  [1] [2] [3] [4] [5] [6] [7] [8] [9] [10]  下一页

打印本文 打印本文 关闭窗口 关闭窗口