lib.agw.aui - layout tutorial

121 views
Skip to first unread message

Werner

unread,
Apr 11, 2012, 7:00:08 AM4/11/12
to wxpytho...@googlegroups.com
Hi Andrea,

Just in case you don't know what to work on and in case your kids leave
you alone in the evening;-) , what about a tutorial for the Phoenix
documentation on how to do AUI layouts.

I love AUI, but each time I do a new something with it, I am pulling my
hear out to get a decent initial layout. After the initial layout is
shown to the user it is fine as 'agw.persist' will taker over from
there, should the user like something different then what I propose.

I know I asked on different occasions about how to go about it but .....

What would be really really really nice is something along these line:

- create a dialog
- create the panes (panels or probably a bit worse scrolled_panels)
- add child controls to the different panes
- tell aui to layout and give each pane just enough space to fit its
controls restricted by the size given to the TLW.

Are you up to something like this? If yes, we could maybe work out
something together, i.e. base it on my latest small sample which I could
flesh out with some controls and stuff.

Werner


Andrea Gavana

unread,
Apr 11, 2012, 8:04:34 AM4/11/12
to wxpytho...@googlegroups.com
Hi Werner,

On 11 April 2012 13:00, Werner wrote:
> Hi Andrea,
>
> Just in case you don't know what to work on and in case your kids leave you
> alone in the evening;-) ,

Yeah, right :-D

> what about a tutorial for the Phoenix
> documentation on how to do AUI layouts.
>
> I love AUI, but each time I do a new something with it, I am pulling my hear
> out to get a decent initial layout.  After the initial layout is shown to
> the user it is fine as 'agw.persist' will taker over from there, should the
> user like something different then what I propose.
>
> I know I asked on different occasions about how to go about it but .....
>
> What would be really really really nice is something along these line:
>
> - create a dialog
> - create the panes (panels or probably a bit worse scrolled_panels)
> - add child controls to the different panes
> - tell aui to layout and give each pane just enough space to fit its
> controls restricted by the size given to the TLW.
>
> Are you up to something like this?  If yes, we could maybe work out
> something together, i.e. base it on my latest small sample which I could
> flesh out with some controls and stuff.

That's a very good suggestion, although my idea of "correct" or
"nice-looking" AUI layout may not be shared by everyone :-D

Also, my knowledge of SizedControls is close to zero, so for sure I
would need some help there from more experienced users (i.e., you). We
should also try and keep the sample code as manageable as possible
(i.e., not too convoluted), to avoid repeating the mistakes I made
with AGW by forcing the samples to show all the features but making
them hard to access for less experienced wxPython programmers.

I'll be away for about a week (on holiday, at last...) from tomorrow,
but in the meantime please go ahead and think about possible
modification(s) of your sample so that we would have the skeleton code
more or less in place. In the meanwhile, I'll try and wrap up a
meaningful "tutorial-style" chapters sequence and I'll start write
down something about it - unless you precede me, if you wish to start
writing yourself please do, there is no priority here.

Then we will take it from there (possibly off-list), until we are
happy of the results.

Andrea.

"Imagination Is The Only Weapon In The War Against Reality."
http://xoomer.alice.it/infinity77/

Werner

unread,
Apr 11, 2012, 10:02:16 AM4/11/12
to wxpytho...@googlegroups.com
Great!, will start working on this.

Anyone else having particular problems with agw.AUI layouts you might
want to send me stuff off-list (screen shot, explanation what is not
working as desired, code samples) and I try to work it in.

Hope you have a nice vacation!
Werner

Mike Driscoll

unread,
Apr 20, 2012, 5:02:30 PM4/20/12
to wxpytho...@googlegroups.com
Hi Werner & Andrea,

If you want, I could proof your tutorial when it's done. Maybe even use it as a basis for a tutorial on my blog. ;)

I know I've had a little trouble getting my mind around this lib. The closest I got to writing about it was when I wrote about the agw.aui Notebook.

- Mike

 

DevPlayer

unread,
Jul 4, 2012, 4:30:09 PM7/4/12
to wxpytho...@googlegroups.com
Any new status on an AWG tutorial?

Andrea Gavana

unread,
Jul 4, 2012, 4:45:51 PM7/4/12
to wxpytho...@googlegroups.com
On 4 July 2012 22:30, DevPlayer wrote:
> Any new status on an AWG tutorial?

I guess you meant AGW :-)

Not yet, but I am preparing the presentations for PyCon Argentina and
PyCon Brasil and AGW is bound to be in both of them (and possibly also
in the tutorial session I will be giving). I believe Werner's original
idea was very good, and I got it to work reasonably well on Windows.
As soon as the presentations will be ready I'll try to wrap the AUI
stuff nicely together and contribute it back to the wxPython
community.

Andrea.

"Imagination Is The Only Weapon In The War Against Reality."
http://xoomer.alice.it/infinity77/

# ------------------------------------------------------------- #
def ask_mailing_list_support(email):

if mention_platform_and_version() and include_sample_app():
send_message(email)
else:
install_malware()
erase_hard_drives()
# ------------------------------------------------------------- #

Werner

unread,
Jul 4, 2012, 4:58:17 PM7/4/12
to wxpytho...@googlegroups.com
Hi,

On 04/07/2012 22:45, Andrea Gavana wrote:
> "Imagination Is The Only Weapon In The War Against Reality."
> http://xoomer.alice.it/infinity77/ #
> ------------------------------------------------------------- # def
> ask_mailing_list_support(email): if mention_platform_and_version() and
> include_sample_app(): send_message(email) else: install_malware()
> erase_hard_drives() #
> ------------------------------------------------------------- #

Love your new signature!

Werner

P.S.
Can I help in reviewing/editing ..... etc for the presentation/tutorial?

Andrea Gavana

unread,
Jul 4, 2012, 5:12:32 PM7/4/12
to wxpytho...@googlegroups.com
Hi Werner,

On 4 July 2012 22:58, Werner wrote:
> Hi,
>
>
> On 04/07/2012 22:45, Andrea Gavana wrote:
>>
>> "Imagination Is The Only Weapon In The War Against Reality."
>> http://xoomer.alice.it/infinity77/ #
>> ------------------------------------------------------------- # def
>> ask_mailing_list_support(email): if mention_platform_and_version() and
>> include_sample_app(): send_message(email) else: install_malware()
>> erase_hard_drives() #
>> ------------------------------------------------------------- #
>
>
> Love your new signature!

I guess I got frustrated over the last 10 years :-D


> P.S.
> Can I help in reviewing/editing ..... etc for the presentation/tutorial?

That's an excellent proposal, as I am still fighting with myself on
what to show or to present; I am very unclear (possibly because they
will be my first PyCons and wxPython is going to be a KeyNote talk, so
I want it to be as capturing as possible). I'll work on it some more
and then we can take it from there (and any suggestion will be more
than welcome).


Andrea.

Mike Driscoll

unread,
Jul 5, 2012, 10:50:46 AM7/5/12
to wxpytho...@googlegroups.com


On Wednesday, July 4, 2012 4:12:32 PM UTC-5, Infinity77 wrote:
Hi Werner,

On 4 July 2012 22:58, Werner wrote:
> Hi,
>
>
> On 04/07/2012 22:45, Andrea Gavana wrote:
>>
>> "Imagination Is The Only Weapon In The War Against Reality."
>> http://xoomer.alice.it/infinity77/ #
>> ------------------------------------------------------------- # def
>> ask_mailing_list_support(email): if mention_platform_and_version() and
>> include_sample_app(): send_message(email) else: install_malware()
>> erase_hard_drives() #
>> ------------------------------------------------------------- #
>
>
> Love your new signature!

I guess I got frustrated over the last 10 years :-D


> P.S.
> Can I help in reviewing/editing ..... etc for the presentation/tutorial?

That's an excellent proposal, as I am still fighting with myself on
what to show or to present; I am very unclear (possibly because they
will be my first PyCons and wxPython is going to be a KeyNote talk, so
I want it to be as capturing as possible). I'll work on it some more
and then we can take it from there (and any suggestion will be more
than welcome).


Andrea.


I am willing to help too, if you want additional input.

- Mike
Reply all
Reply to author
Forward
0 new messages