I am perplexing to emanate a plans with 3 panels and it looks some thing
like this.| Img Panel ||-------------------------| |
| || | || | ||
A | B || |
||------------|------------| In a quarrel A and B i will be carrying a
some Dialog and buttons and a Img quarrel wil enclose a bitmap image.When
i govern my formula am means to emanate 3 panels though am not means to
resize a quarrel with a settlement .Any suggestions would unequivocally
help?code:import wxclass MyFrame(wx.Frame): def init(self, parent, id,
title): wx.Frame.init(self, parent, id, title, wx.DefaultPosition,
wx.Size(350, 300)) splitter1 = wx.SplitterWindow(self, -1,
style=wx.SP_3DBORDER) splitter2 = wx.SplitterWindow(splitter1, -1,
style=wx.SP_3DBORDER) #wx.TextCtrl(self) #Creating Panel 1 panel1
= wx.Panel(splitter2, -1,size =(-1,100) )
panel1.SetBackgroundColour(wx.WHITE) box = wx.BoxSizer(wx.HORIZONTAL)
panel1_heading = wx.StaticText(panel1, -1, "DEVICE DETAILS")
panel1_heading.SetForegroundColour((255,0,0)) #ECECEC font1_heading =
wx.Font(15, wx.MODERN, wx.NORMAL, wx.BOLD) panel1_heading
.SetFont(font1_heading) #Sizer for Panel1 # sizer =
wx.GridBagSizer(9, 9) # sizer.Add(panel1_heading, (1,2), wx.ALIGN_LEFT)
# sizer.Add(qps_info, (1,2), wx.ALIGN_LEFT) #
SetSizerAndFit(windowSizer) #panel1.SetSizer(box) panel2 =
wx.Panel(splitter2, -1,size =(-1,120))
panel2.SetBackgroundColour(wx.BLACK) panel2_heading =
wx.StaticText(panel2, -1, "MONITOR" )
panel2_heading.SetForegroundColour((255,0,0)) #336699 font2_heading =
wx.Font(15, wx.MODERN, wx.NORMAL, wx.BOLD)
panel2_heading.SetFont(font2_heading) panel2.SetSizer(box) panel_img
= wx.Panel(splitter1, -1,size =(-1,300))
panel_img.SetBackgroundColour('#4f5049') #pic =
wx.StaticBitmap(panel_img) #pic.SetBitmap(wx.Bitmap('xstar_logo.png'))
box1 = wx.BoxSizer(wx.HORIZONTAL) box2 = wx.BoxSizer(wx.VERTICAL)
splitter1.SplitHorizontally(panel_img, splitter2)
splitter1.SetSizer(box1) splitter2.SplitVertically(panel1, panel2)
splitter2.SetSizer(box2) self.Centre()class MyApp(wx.App): def
OnInit(self): support = MyFrame(None, -1, 'splitterwindow.py')
frame.Show(True) self.SetTopWindow(frame) relapse Trueapp
= MyApp(0)app.MainLoop()
No comments:
Post a Comment