-----Original Message-----
From: python-list-bounces+ramit.prasad=jpmorgan....@python.org 
[mailto:python-list-bounces+ramit.prasad=jpmorgan....@python.org] On Behalf Of 
faucheuse
Sent: Monday, October 17, 2011 5:33 AM
To: python-list@python.org
Subject: Problem with a wx notebook

Hi there,

I've created a wx NoteBook in wich I set multiples panels in wich I
set one or more sizers. But nothing displays in the notebook,
everything is outside. I've been searching an answer for 2 days ><.
Can you help me plz ? Here is my code(with only one panel, to sum up
the code) :

class StreamingActivationDialog(wx.Dialog):
    def __init__(self, *args, **kwds):
        # begin wxGlade: StreamingActivationDialog.__init__
        kwds["style"] = wx.DEFAULT_DIALOG_STYLE
        wx.Dialog.__init__(self, *args, **kwds)
        self.bitmap_1_copy = wx.StaticBitmap(self, -1, wx.Bitmap("img\
\logo.png", wx.BITMAP_TYPE_ANY))
        self.labelDnD = wx.StaticText(self, -1, "Si vous avez déjà un
fichier d'activation, faite le glisser dans cette fenetre")
        self.keyBitmap = wx.StaticBitmap(self, -1, wx.Bitmap("img\
\key.bmp", wx.BITMAP_TYPE_ANY))
        self.conclude = wx.StaticText(self, -1, _("test"),
style=wx.ALIGN_CENTRE)

        ### Panel ###
        self.intro3_label = wx.StaticText(self, -1, "Envoyez un mail à
\nactivat...@monmail.com\ncontenant le code :",style=wx.ALIGN_CENTRE)
        self.activationCode_label= wx.StaticText(self, -1,
"123456789", style=wx.TE_READONLY)
        self.copy2_Button = wx.Button(self, -1, "Copier dans le presse-
papier")
        self.copy2_Button.Bind(wx.EVT_BUTTON, PanelMail.onCopy)
        ##############

        self.note = wx.Notebook(self, wx.ID_ANY, style=wx.BK_LEFT,
size=wx.Size(100, 341))
        self.page3 = wx.Panel(self.note)

        imagelist = wx.ImageList(94, 94)
        bitmap1 = wx.Bitmap("img\\a.bmp", wx.BITMAP_TYPE_BMP )
        imagelist.Add(bitmap1)
        self.note.AssignImageList(imagelist)

        self.__set_properties()
        self.__do_layout()
        # end wxGlade

    def __set_properties(self):
        # begin wxGlade: StreamingActivationDialog.__set_properties
        self.SetTitle(_("Activation de FlashProcess"))
        self.SetBackgroundColour(wx.Colour(255, 255, 255))
        #self.linkProblem.SetForegroundColour(wx.Colour(0, 0, 0))
        # end wxGlade

    def __do_layout(self):
        # begin wxGlade: StreamingActivationDialog.__do_layout
        self.grid_sizer_1 = wx.FlexGridSizer(6, 1, 0, 0)
        self.grid_sizer_2 = wx.FlexGridSizer(1, 2, 0, 30)
        self.grid_sizer_1.Add(self.bitmap_1_copy, 0, wx.TOP|wx.BOTTOM|
wx.EXPAND, 10)


        ### Page 3 ###
        sizer = wx.BoxSizer(wx.VERTICAL)
        sizer.Add(self.intro3_label, 0, wx.BOTTOM|wx.ALIGN_CENTER, 5)
        sizer.Add(self.activationCode_label, 0, wx.BOTTOM|
wx.ALIGN_CENTER, 20)
        sizer.Add(self.copy2_Button, 0, wx.ALIGN_CENTER, 20)

        self.page3.SetSizer(sizer)
        sizer.Fit(self.page3)
        ##############

        self.note.AddPage(self.page3, "", False, 0)

        self.Bind(wx.EVT_TOOLBOOK_PAGE_CHANGED, self.OnPageChanged)
        self.Bind(wx.EVT_TOOLBOOK_PAGE_CHANGING, self.OnPageChanging)

        self.grid_sizer_1.Add(self.note, 0, wx.EXPAND, 20)
        self.grid_sizer_1.Add(self.labelDnD, 0, wx.TOP|
wx.ALIGN_CENTER_HORIZONTAL, 20)
        self.grid_sizer_2.Add(self.keyBitmap, 0, wx.LEFT, 10)
        self.grid_sizer_2.Add(self.labelDnD, 0, wx.LEFT, 20)
        self.grid_sizer_1.Add(self.grid_sizer_2, 0, wx.EXPAND, 20)
        self.grid_sizer_1.Add(self.conclude, 0, wx.TOP|
wx.ALIGN_CENTER_HORIZONTAL, 20)

        self.SetSizer(self.grid_sizer_1)
        self.grid_sizer_1.Fit(self)
        self.Layout()
        # end wxGlade

    def OnPageChanged(self, event):
        event.Skip()

    def OnPageChanging(self, event):
        event.Skip()
=========================================

Is this still a problem?

Ramit


Ramit Prasad | JPMorgan Chase Investment Bank | Currencies Technology
712 Main Street | Houston, TX 77002
work phone: 713 - 216 - 5423




This email is confidential and subject to important disclaimers and
conditions including on offers for the purchase or sale of
securities, accuracy and completeness of information, viruses,
confidentiality, legal privilege, and legal entity disclaimers,
available at http://www.jpmorgan.com/pages/disclosures/email.  
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to