[2.8.0] wxSizerFlag and missing methods

H H at h.com
Tue Jan 30 14:07:02 PST 2007


In article <iP7bn.A.iUF.aQPvFB at brage.sunsite.dk>,
 vadim at wxwindows.org (Vadim Zeitlin) wrote:

> On Sun, 28 Jan 2007 19:19:39 +0100 H <H at h.com> wrote:
> 
> H> is it possible to add for the next release missing methods for 
> H> wxSizerFlags?
> H> 
> H> Missing are:
> H> 
> H>  - All() {return Align(wxALL);}
> 
>  This is the same as Border().
> 
> H>  - Top() {return Align(wxALIGN_TOP);}
> H>  - Bottom() {return Align(wxALIGN_BOTTOM);}
> 
>  Those could be added for symmetry with Left/Right() I guess although I
> think they're far less common.

I think they should be added because otherwise wxSizerFlags is less 
intuitive. And actually there is no reason why the mentioned methods 
should not be added.

> 
> H>  - CenterHorizontal() {return (wxALIGN_CENTER_HORIZONTAL);}
> H>  - CenterVertical() {return (wxALIGN_CENTER_VERTICAL);}
> 
>  I wonder if we shouldn't just make alignment (at least when using
> wxSizerFlags?) CENTRE by default. Then those wouldn't be necessary.
>  
>  Regards,
> VZ

I do not recommend this because the default wxSizerFlags settings should 
be identical to the default individual settings, means

wxSizer::Add(wxWindow*, int proportion, int flags, int border)

==

wxSizer::Add(wxWindow*, wxSizerFlags)

Otherwise somebody could argue that also the explicit settings should be 
changed.

Hartwig






More information about the wx-users mailing list