0
실제로 설치하지 않고 설치 프로그램처럼 보이는 것을 만들려고합니다. (지금 wxPython을 탐색 할 때 사용하고 있습니다.) 그리고 지금은 패널을 다른 패널에 놓았지만, 그럴 때마다 창문이 회색으로 나타나고 버튼 하나만 나타납니다.패널을 wxPython의 BoxSizer에 삽입 할 수 있습니까?
import wx
class PanelOne(wx.Panel):
def __init__(self,*args,**kwargs):
wx.Panel.__init__(self,*args,**kwargs)
def initUI(self):
vbox=wx.BoxSizer(wx.VERTICAL)
vbox.Add(wx.StaticText(self,-1,'This is Panel One'),0,wx.ALIGN_CENTER_HORIZONTAL|wx.ALIGN_CENTER_VERTICAL)
vbox.SetSizeHints(self)
self.SetSizer(vbox)
self.Show(True)
class Gui(wx.Frame):
def __init__(self,*args,**kwargs):
wx.Frame.__init__(self,*args,**kwargs)
self.initUI()
self.tTips()
def initUI(self):
panel=wx.Panel(self)
self.vbox=wx.BoxSizer(wx.VERTICAL)
panel.SetSizer(self.vbox)
##This is what im having trouble with
p1=PanelOne(self)
self.vbox.Add(p1,3,wx.ALL,10)
##
btnBox=wx.BoxSizer(wx.HORIZONTAL) #This Sizer is for the box that will hold the next and back buttons.
backBtn=wx.Button(panel,-1,'&Back')# back button
backBtn.Bind(wx.EVT_BUTTON,self.onBack)
btnBox.Add(backBtn,0,wx.ALL,10)
nextBtn=wx.Button(panel,-1,'&Next')# next button
nextBtn.Bind(wx.EVT_BUTTON,self.onNext)
btnBox.Add(nextBtn,0,wx.ALL,10)
self.vbox.Add(btnBox)
self.vbox.SetSizeHints(self)
self.Show(True)
def onNext(self,e):
pass
def onBack(self,e):
pass
def tTips(self):
pass
if __name__ == '__main__':
app=wx.App()
gui=Gui(None,-1,'Title Yo')
app.MainLoop()