GUI design with wxPython

I'm trying to get the most out of wxPython, and being a new user would
appreciate some guidance from those of you who with greater experience and
wisdom.

I understand this may not be a matter for the mailing list, and don't want
to start any testimonials of religious-like fervour about why your way is
better than others, but still feel inclined to ask.

How do you do your GUI design?

1) Code it manually

or

2) Use a layout tool. If so, which one? Was it easy to learn?

Rather than clog up the list please email me directly on cjm@ava.com.au. If
requested I wil summarise for the list later.

TIA,

Chris.

I wouldn't worry about clogging up the mailing list. We like
to hear this stuff straight from the source so our brains can
absorb like sponges :slight_smile:

I'm trying to get the most out of wxPython, and being a new user would
appreciate some guidance from those of you who with greater experience and
wisdom.

I understand this may not be a matter for the mailing list, and don't want
to start any testimonials of religious-like fervour about why your way is
better than others, but still feel inclined to ask.

How do you do your GUI design?

1) Code it manually

or

2) Use a layout tool. If so, which one? Was it easy to learn?

  I think this is really a preference thing. Many people do use
graphical design tools, but I personally code it by hand. I guess
it depends on your penchant for generated code (I'm not a big fan
for stuff that sits in the core of my apps). At this point, I have
sufficient experience that I'd say I'm rather fast at hand-coding. But
if you're just beginning, a graphical tool might be a good way to
learn about things like sizers (by looking at the generated code).
I'm sure some others will suggest some good graphical design tools.
I think you should just go with what you feel most comfortable with.

                 -- Mike

···

On Tue, Nov 05 @ 15:48, Chris Munchenberg wrote:

--
Michael Gilfix
mgilfix@eecs.tufts.edu

For my gpg public key:
http://www.eecs.tufts.edu/~mgilfix/contact.html

1) Code it manually

or

2) Use a layout tool. If so, which one? Was it easy to learn?

I'm a newb and I prefer the hand coded approach. I've found it an advantage in terms of getting the
gui to do things that it couldn't normally do (i.e. getting a notepad panel to destroy itself). I'm
always somewhat mistrustful of the graphical layout route though. And it's taken me ages to actually
get anywhere.

David Gentle

I'm trying to get the most out of wxPython, and being a new user would
appreciate some guidance from those of you who with greater experience and
wisdom.

I understand this may not be a matter for the mailing list, and don't want
to start any testimonials of religious-like fervour about why your way is
better than others, but still feel inclined to ask.

How do you do your GUI design?

1) Code it manually

or

2) Use a layout tool. If so, which one? Was it easy to learn?

Rather than clog up the list please email me directly on cjm@ava.com.au. If
requested I wil summarise for the list later.

I'm using the commercial wxDesigner (www.roebling.de). A pretty good tool,
however it misses quite some features of wxwindows. It saves either a
ressource file and/or c++,perl or python code. The generated code is quite
good to read and modify. I just design the dialogs and do the fine tuning by
hand. It actually saves a lot of typing, i.e. it can create custom classes
for dialogs and you don't have to type all the event definitions yourself
(EVT_LISTBOX(....))
The tool is stable but i.e. doesn't support widgets like the calendar and
checklisbox. You could say it supports all controls that haven't been
introduced recently.
Basically I'm a old school "use emacs and do it manually" type of programer. I
never liked the development environments since they are usually restrictive.
However I think I just don't have the time anymore to shove sizers and
positioning frames by hand and call the result on every second modification
just to see what it looks like. If you're doing quick and dirty development
on a larger project you probably have to go through 5 dialogs until you reach
the one you're working on. Therefor I like doing the basic layout with a tool
and do the rest manually.

···

On Monday 04 November 2002 09:18 pm, Chris Munchenberg wrote:

TIA,

Chris.

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

--
  UC

--
Open Source Solutions 4U, LLC 2570 Fleetwood Drive
Phone: +1 650 872 2425 San Bruno, CA 94066
Cell: +1 650 302 2405 United States
Fax: +1 650 872 2417

I do everything 'by hand': Emacs is my main tool, along with the interpreter. I do this because in OO GUI design, I make lots of custom widgets (like the attached file). I never build a UI w/out some custom component that inherits from something like wxPanel. I'm constantly refactoring as I work, creating more of them, plugging them in, removing redundant code, etc.

I'd maybe use a layout tool if it supported any valid wxPython component; not just the pre-made ones. This, by the way, is what Javabeans do.

Robb

Mockup.py (3.02 KB)

well my problem is this.. i have a tree... and i need to do
a GetNextChild......
one of the problems is that the tutorial says this function returns an
item.... when in fact it returns a tuple... (item,number)... i have no idea
what this number is.....

the tutorial alsa says that this function returns an invalid item if there
are no further children... .... but how do i tes if item is valid or
not?!?!??!

if anybody has used this before.. please answer... THANKS!!!

well my problem is this.. i have a tree... and i need to do
a GetNextChild......
one of the problems is that the tutorial says this function returns an
item.... when in fact it returns a tuple... (item,number)... i have no idea
what this number is.....

See the wxWindows reference-manual--the number is the `cookie' that
should be passed to the next call to GetNextChild.

the tutorial alsa says that this function returns an invalid item if there
are no further children... .... but how do i tes if item is valid or
not?!?!??!

This is also in the reference-manual: to test whether a wxTreeItemId
is valid, there is an `IsOk' method.

···

On Wed, Nov 06, 2002 at 12:09:22AM -0000, Tiago Duarte Felix wrote:

--
"Where you come from is gone.
Where you thought you were goin'... weren't never there.
And where you are ain't no good unless you can get away from it."

Thanks you have been of great help!!!!!

i need help again.... i can't find this IsOk method in the reference manual
in the
wxTreeCtrl subject..... i didn't find it also on the classes that the tree
ctrl inherits....

i am using the reference manual that comes with wxpython for windows...
version 2.3.... is there another reference manual?? if not... how do i use
the IsOk method!!... tree.IsOk( Item Id??) is this it?

> the tutorial alsa says that this function returns an invalid item if

there

···

> are no further children... .... but how do i tes if item is valid or
> not?!?!??!

This is also in the reference-manual: to test whether a wxTreeItemId
is valid, there is an `IsOk' method.

--
"Where you come from is gone.
Where you thought you were goin'... weren't never there.
And where you are ain't no good unless you can get away from it."

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

It's item.IsOk(), as described in the section of the reference-manual
about wxTreeItemId.

If you want to iterate through the children of a tree, you basically
want to do something like:

child, cookie = tree.GetFirstChild(root, 0)
while child.IsOk():
    ... do stuff...
    child, cookie = tree.GetNextChild(child, cookie)

···

On Wed, Nov 06, 2002 at 02:15:47PM -0000, Tiago Duarte Felix wrote:

i need help again.... i can't find this IsOk method in the reference manual
in the
wxTreeCtrl subject..... i didn't find it also on the classes that the tree
ctrl inherits....

i am using the reference manual that comes with wxpython for windows...
version 2.3.... is there another reference manual?? if not... how do i use
the IsOk method!!... tree.IsOk( Item Id??) is this it?

--
"Human beings can be bright, in a sort of `look what my 2-year-old can
do' sort of way, if, for two minutes, they can keep their mind off of
large-breasted life-guards, coffee-cake that doesn't make you fat, and
Celine Dion." --Third Rock from the Sun

all i can find in the manul is wxTreeCtrl and wxTreeItemData...... i
can't find anithing on wxTreeItemId.... which manual are you using?? where
can i get it??

Thanks!

···

----- Original Message -----
From: "Joshua Judson Rosen" <rozzin@geekspace.com>
To: <wxPython-users@lists.wxwindows.org>
Sent: Wednesday, November 06, 2002 2:38 PM
Subject: Re: [wxPython-users] In a tree how do i test if item is good or
invalid???

On Wed, Nov 06, 2002 at 02:15:47PM -0000, Tiago Duarte Felix wrote:
> i need help again.... i can't find this IsOk method in the reference

manual

> in the
> wxTreeCtrl subject..... i didn't find it also on the classes that the

tree

> ctrl inherits....
>
> i am using the reference manual that comes with wxpython for windows...
> version 2.3.... is there another reference manual?? if not... how do i

use

> the IsOk method!!... tree.IsOk( Item Id??) is this it?

It's item.IsOk(), as described in the section of the reference-manual
about wxTreeItemId.

If you want to iterate through the children of a tree, you basically
want to do something like:

child, cookie = tree.GetFirstChild(root, 0)
while child.IsOk():
    ... do stuff...
    child, cookie = tree.GetNextChild(child, cookie)

--
"Human beings can be bright, in a sort of `look what my 2-year-old can
do' sort of way, if, for two minutes, they can keep their mind off of
large-breasted life-guards, coffee-cake that doesn't make you fat, and
Celine Dion." --Third Rock from the Sun

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