WxPython StaticLine after Image in BoxSizer -
After a static line I am trying to insert a StaticLine (vertical) after an image, I have some buttons I have kept them all in the boxciss (horizontal). But when I walk I do not see a constant line What's wrong with me? .. Please help me
thanks
Here are some code
class frame1 (wx.Frame) :. Def __init __ (self, * args, ** kwds): wx.Frame .__ init __ (self, * args, ** kwds) self.panel1 = wx.Panel (self, wx.ID_ANY) img = wx.EmptyImage (MaxImageSize, MaxImageSize) self.imgctrl = wx .StaticBitmap (self.panel1, wx.ID_ANY, wx.BitmapFromImage (img)) self.st = wx.StaticLine (self.panel1, wx.ID_ANY, style = wx.LI_VERTICAL) self.but = wx.Button (self. Panel1, wx.ID_ANY, 'OK') self.hbox = wx.BoxSizer (wx.HORIZONTAL) self.hbox.Add (self.imgctrl, 0, wx.ALL, 5 ) Self.hbox.Add (self.st, 0, wx.ALL, 5) self.hbox.Add (self.but, 1, wx.ALL, 5) self.panel1.SetSizer (self.hbox) self.hbox After the text "itemprop =" text ">
Adding staticline to the need for it spreads to fill Area Stand standing places.
import wx clas of frame1 (wx.frame): def __init __ (auto, * args, ** kwds): wx.frame .__ init __ (auto, * args, * * kwds) self.panel1 = wx.Panel (self, wx.ID_ANY) img = wx.EmptyImage (100, 100) self.imgctrl = wx.StaticBitmap (self.panel1, wx.ID_ANY, wx.BitmapFromImage (img)) Self.st = wx.StaticLine (self.panel1, wx.ID_ANY, style = wx.LI_VERTICAL) self.but = wx.Button (self.panel1, wx.ID_ANY, 'OK') self.hbox = wx.BoxSizer (wx.HORIZONTAL) self.hbox.Add (self.imgctrl, 0, wx .ALL, 5) self.hbox.Add (own. 0, wx.ALL | wx.EXPAND, 5) self.hbox.Add (self .but, 1, wx.ALL, 5) self.panel1.SetSizer (self.hbox) self.hbox.Fit (self.panel1) if __name__ == '__main__': app = wx.App (false) frame_1 = frame1 (None) frame_1.Show () app.MainLoop ()
Comments
Post a Comment