Vá: Re: Newbie - please help me !

Thanx !!!!
I try with every syntax, but I do like Delphi - a panel in the base panel, and it is not working.
But your code is working ! It is very good !

THX !!!!
KK

cota@ucalgary.ca 02/26 10:38 de. >>>

Best way to learn is of course the demo. Also the wiki pages have
interesting stuff.

You could try this code. (Ii flickers quite a bit in my machine though)

from wxPython.wx import *

class TestFrame(wxFrame):
    def __init__(self, parent, log):
        wxFrame.__init__(self, parent, -1, "My Test Frame",
style=wxDEFAULT_FRAME_STYLE)

        mainSizer = wxBoxSizer(wxVERTICAL)
        rootPanel = wxPanel(self, -1)
        panel1 = wxPanel(rootPanel, -1, size=wxSize(300, 80))
        panel2 = wxPanel(rootPanel, -1, size=wxSize(300, 200))
        panel3 = wxPanel(rootPanel, -1, size=wxSize(300, 80))

        panel1.SetBackgroundColour(wxColour(20, 30, 40))
        panel2.SetBackgroundColour(wxColour(202, 200, 200))
        panel3.SetBackgroundColour(wxColour(0, 200, 40))

        mainSizer.Add(panel1, 0, wxEXPAND|wxHORIZONTAL)#
        mainSizer.Add(panel2, 1, wxEXPAND|wxALL)
        mainSizer.Add(panel3, 0, wxEXPAND|wxHORIZONTAL) #

        rootPanel.SetAutoLayout(true)
        rootPanel.SetSizer(mainSizer)
        mainSizer.SetSizeHints(rootPanel)
        mainSizer.Fit(self)

if __name__ == '__main__':
    import sys
    app = wxPySimpleApp()
    frame = TestFrame(None, sys.stdout)
    frame.Centre(wxBOTH)
    frame.Show(true)
    app.MainLoop()

Raul

···

----- Original Message -----
From: "Kepes Krisztian" <Kepes.Krisztian@peto.hu>
To: <wxPython-users@lists.wxwindows.org>
Sent: Wednesday, February 26, 2003 2:14 AM
Subject: [wxPython-users] Newbie - please help me !

I want to make an simple interface with wx and python, but I have problem
with the layout creating.

I want to create an form(frame) with:

top panel (full width, height=80 fixed)
center panel(full width, full height-160)
bottom panel(full width, height=80 fixed)

In the top panel I want to create 3 buttons, left to right, with same size
(in layout).
In the center I want to create an notebook, with full size.

So I want to learn, how I create an simple, resizable form, with
self-resizable subcomponents.

I try, but my knowledge is very little.

Please send me an simple code to I can start this program.

Thanx:
KK

---------------------------------------------------------------------
To unsubscribe, e-mail: wxPython-users-unsubscribe@lists.wxwindows.org
For additional commands, e-mail: wxPython-users-help@lists.wxwindows.org

---------------------------------------------------------------------
To unsubscribe, e-mail: wxPython-users-unsubscribe@lists.wxwindows.org
For additional commands, e-mail: wxPython-users-help@lists.wxwindows.org