Re: wxGlade tutorial

Peter Bradley <[email protected]>
Newsgroups gmane.comp.python.wxglade
Message-ID <[email protected]>
El 14/11/17 a las 23:45, Dietmar Schwertberger escribió:

...

Hi Dietmar:

Here are some comments on Page 2 of the tutorial.  Please do tell me to 
stop if you're fed up of receiving these.  Or if you want to receive 
them in a different way, or if you would like me to take a different 
approach...

I see that you are the author of the pages, so I am in your hands.

PAGE 2 WX BASICS

SECTION - CONCEPT
Use of URLs.  Depends on policy here, as to whether URLs should be 
displayed via some link text or whether they should be 'bare'.  I prefer 
explicit link text such as:

"Overview and Hello World example." (as a link and in place of "See here 
for an Overview...").  Something similar could be done in the next line, 
too, and in other places throughout the text on all pages.

It's really a matter of policy.  I prefer the use of link text as it is 
better from an accessibility point of view - especially for people using 
screen readers.

SECTION - EXAMPLES

I think, in a tutorial, the language needs to be a bit less terse. 
Here's what I would do for each commentary:

Vertical BoxSizer
This sizer stacks the controls it manages one above the other.  This 
example shows three buttons arranged in this way.

Horizontal BoxSizer
This sizer arranges its controls alongside of one another.  This example 
shows three button arranged in this way.

Allowing controls to expand and/or grow
Controls can "grow" horizontally, or "expand" vertically in response to 
changes in window size. In this three button example, using a Horizontal 
BoxSizer:
     * The middle button has been allowed to grow horizontally
     * The third button has been allowed to expand vertically

Alignment of controls
The alignment of controls within a sizer can also be specified. This 
example also uses a Horizontal BoxSizer to specify that:
     * The first button is "top" aligned
     * The middle button is "bottom" aligned
     * The third button has been given a border that provides some space 
around it on all sides

StaticBoxSizer
In this example, a Horizontal StaticBoxSizer has been used to contain 
the three buttons (which have the same properties set as those in the 
previous example).  This sizer puts a border around its edges and 
provides a label with which to describe its contents.

StaticBoxSizers can be either Horizontal or Vertical, just like their 
"non-static" equivalents.

GridSizer
GridSizers arrange their contained controls in a grid made up of equally 
sized rows and columns.  In this example, the grid has been set to two 
rows and two columns.
Each cell in the example contains a button, which has been centred in 
the cell.

Expanding, growing and aligning in a grid cell
In this example:
     * The first button has been aligned LEFT
     * The second button has been aligned BOTTOM
     * The third button has been allowed to expand
     * The fourth button has been aligned RIGHT and CENTER

FlexGridSizer
The FlexGridSizer allows a little more flexibility over cell sizes by 
allowing individual rows and columns to grow and/or expand.  In this 
example, the first column has been allowed to grow horizontally and the 
second one allowed to grow vertically.  Note that this becomes obvious 
when the window is resized by the user.

GridBagSizer
This example uses a 3x3 grid and five buttons. It shows how a 
GridBagSizer can allow controls to span multiple columns and/or rows.  
All the buttons have their EXPAND property set so that they fill all the 
space in the cell(s).

SECTION - EXAMPLE APPLICATION: CALCULATOR WINDOW

This is a really well thought out section.  The only change I would 
suggest is to alter:

... for e.g. one label and one button

to:

... for the horizontally arranged controls they contain (e.g. one label 
and one button)

There should also be a comma after, "plus a horizontal line" so that the 
text should read:

This window is managed by one vertical box sizer with six slots for the 
five rows plus a horizontal line, and five horizontal box sizers for the 
horizontally arranged controls they contain (e.g. one label and one button):

The comma (the Oxford comma as it is know) makes clear the the five rows 
and horizontal line make up one item.

SECTION - wxGlade Requirements / Restrictions

There should be no space around the forward slash: wxGlade 
Requirements/Restrictions.  If this results in a loss of clarity, it 
should be rewritten to wxGlade Requirements and Restrictions (or you 
could use and/or).

I know a lot of people do use the forward slash with spaces, but people 
also put spaces before exclamation marks.  It doesn't make it right. :)

The text for this section is fine.  My preference would be to use 
"cannot" instead of "can't", and to replace the semicolon with a full 
stop - but these are just my preferences.  Therefore I would have:

The user interface and internal data structures of wxGlade impose some 
restrictions on the structure of a window. A frame or panel cannot have 
a widget as direct child. They always need a toplevel sizer first. So 
don’t be surprised to see constructions like: ...


Oh! and by the way, I wish my German were as good as your English. I've 
just started learning and am determined to see it through.

Best regards


Peter

-- 

*Peter Bradley*

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot

_______________________________________________
wxGlade-general mailing list
wxGlade-general-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
https://lists.sourceforge.net/lists/listinfo/wxglade-general
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.