저는 wxPython을 시작했습니다.wxPython에서 패널 겹침을 방지 하시겠습니까?
가 어떻게이 중복을 방지 할 수 있습니다 :이 같은 정말 작은 보이는되도록 내가 창 크기를 조정하면
import wx
class SASFrame(wx.Frame):
def __init__(self,parent,id,title):
wx.Frame.__init__(self,parent,id,title)
groupPanel = wx.Panel(self)
st = wx.StaticText(groupPanel, -1, "Which characteristics would you like to group by?")
cbAge = wx.CheckBox(groupPanel, -1, "Age")
cbMarket = wx.CheckBox(groupPanel,-1, "Market")
groupSizer = wx.BoxSizer(wx.VERTICAL)
groupSizer.AddMany([st,cbAge, cbMarket])
groupPanel.SetSizer(groupSizer)
summaryPanel = wx.Panel(self)
st2 = wx.StaticText(summaryPanel, -1, "What would you like to summarize?")
cbPremiums = wx.CheckBox(summaryPanel,-1, "Premiums")
cbClaims = wx.CheckBox(summaryPanel,-1, "Claims")
summarySizer = wx.BoxSizer(wx.VERTICAL)
summarySizer.AddMany([st2,cbPremiums,cbClaims])
summaryPanel.SetSizer(summarySizer)
frameSizer = wx.BoxSizer(wx.VERTICAL)
frameSizer.Add(groupPanel,1,wx.EXPAND)
frameSizer.Add(summaryPanel,1,wx.EXPAND)
self.SetSizer(frameSizer)
class SASApp(wx.App):
def __init__(self):
wx.App.__init__(self)
def OnInit(self):
self.frame = SASFrame(parent=None,id=-1,title="HCRFM Custom Report Generator")
self.frame.Show()
self.SetTopWindow(self.frame)
return True
def main():
app = SASApp()
app.MainLoop()
if __name__ == '__main__':
main()
: 나는 다음과 같은 코드가? 또한 사용자가 텍스트를 가로로자를만큼 작게 만들 수 없도록하려면 어떻게해야합니까? 후자에 대해 걱정해야하는지 잘 모르겠습니다.