[Tutor] wxPython

Rob rob@uselesspython.com
Wed, 31 Jul 2002 15:40:45 -0500


I'm away from all my documentation and stuff in a secluded hole where I can
study for my final exam in this C++ and Win32 API class I'm taking, or I'd
try to take a bit of a stab at this one.

I've seen it stated before that there would be more wxPython documentation,
but that the documentation for wxWindows is supposed to be quite good and
carries over to wxPython directly to a great degree.

Rob

> -----Original Message-----
> From: tutor-admin@python.org [mailto:tutor-admin@python.org]On Behalf Of
> Terje Johan Abrahamsen
> Sent: Wednesday, July 31, 2002 3:30 PM
> To: tutor@python.org
> Subject: [Tutor] wxPython
>
>
> I downloaded wxPython and started to look around. It seems to be a great
> tool. However, I haven't found much documentation. Ok, there is, but not
> that I understand much of. Most seems to be for C++.
>
> So, I took one of the examples and tried to run it in Python.
> But, it wanted
> some arguments. However, I have no idea what arguments to give,
> and all my
> guesses ended in failure. Could somebody look at this code, and
> let me know
> what arguments are needed? And hopefully also write a few sentences about
> how this thing work. I guess, when I get it first running, I can
> modify and
> play around... PS!! This is all I can find about it. No more
> documentation...
>
> Thanks in advance,
> Terje
>
> from wxPython.wx import *
>
> #-----------------------------------------------------------------
> ----------
>
> class TestCheckBox(wxPanel):
>     def __init__(self, parent, log):
>         self.log = log
>         wxPanel.__init__(self, parent, -1)
>
>         wxStaticText(self, -1, "This example uses the wxCheckBox
> control.",
>                                wxPoint(10, 10))
>
>         cID = NewId()
>         cb1 = wxCheckBox(self, cID,   "  Apples", wxPoint(65, 40),
> wxSize(150, 20), wxNO_BORDER)
>         cb2 = wxCheckBox(self, cID+1, "  Oranges", wxPoint(65, 60),
> wxSize(150, 20), wxNO_BORDER)
>         cb2.SetValue(true)
>         cb3 = wxCheckBox(self, cID+2, "  Pears", wxPoint(65, 80),
> wxSize(150, 20), wxNO_BORDER)
>
>         EVT_CHECKBOX(self, cID,   self.EvtCheckBox)
>         EVT_CHECKBOX(self, cID+1, self.EvtCheckBox)
>         EVT_CHECKBOX(self, cID+2, self.EvtCheckBox)
>
>
>     def EvtCheckBox(self, event):
>         self.log.WriteText('EvtCheckBox: %d\n' % event.Checked())
>
> #-----------------------------------------------------------------
> ----------
>
> def runTest(frame, nb, log):
>     win = TestCheckBox(nb, log)
>     return win
>
> #-----------------------------------------------------------------
> ----------
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> overview = """\
> A checkbox is a labelled box which is either on (checkmark is visible) or
> off (no checkmark).
>
> """
>
>
>
>
> _________________________________________________________________
> MSN Photos is the easiest way to share and print your photos:
> http://photos.msn.com/support/worldwide.aspx
>
>
> _______________________________________________
> Tutor maillist  -  Tutor@python.org
> http://mail.python.org/mailman/listinfo/tutor
>