Re: Centring hyphertextctrl widgets
"Brendan Simon (eTRIX)" <[email protected]> Wed, 11 Sep 2019 22:47:54 +1000
| Newsgroups | gmane.comp.python.wxglade |
|---|---|
| Organization | eTRIX pty ltd |
| Message-ID | <[email protected]> |
Hi Dietmar,
Attached is a PDF which hopefully demonstrates "what I want" and "what I
get".
On Windows the hyperlink widget (native) does not have the ability to
align to centre (only align left and right). By setting the wxSHAPED
style, it forces the widget to take up the minimum amount of space and
can be positioned within the sizer slot (left, centre, right, etc).
https://docs.wxwidgets.org/3.0/overview_sizer.html
This wxwidgets 3.0 documentation link states:
/"""/
/Z/Then what do we do when a column sizer changes its width? This
behaviour is controlled by /flags/ (the second parameter of the
Add() function): Zero or no flag indicates that the window will
preserve it is original size, wxGROW flag (same as wxEXPAND) forces
the window to grow with the sizer, and wxSHAPED flag tells the
window to change it is size proportionally, preserving original
aspect ratio. When wxGROW flag is not used, the item can be aligned
within available space. wxALIGN_LEFT, wxALIGN_TOP, wxALIGN_RIGHT,
wxALIGN_BOTTOM, wxALIGN_CENTER_HORIZONTAL and
wxALIGN_CENTER_VERTICAL do what they say. wxALIGN_CENTRE (same as
wxALIGN_CENTER) is defined as (wxALIGN_CENTER_HORIZONTAL |
wxALIGN_CENTER_VERTICAL). Default alignment is wxALIGN_LEFT |
wxALIGN_TOP.
/"""/
It's not a very clear description (in my opinion). I may have
misinterpreted it, but what I am seeing is when I check wxSHAPED, the
size of the widget window is minimised and can be positioned in the
sizer slot by the layout alignment flags.
wxglade does not allow the combination of proportion=1 (or non zero) and
wxSHAPED. Removing that constraint allows me to do what I want.
If there is another way, then I'm happy to use that too.
Brendan.
--
On 4/9/19 3:44 am, Dietmar Schwertberger wrote:
> Hi Brendan,
>
> with "what you actually want to accomplish" I did not mean the SHAPED
> stuff.
> Just post your original problem. Usually, sizers should do the job:
> http://wxglade.sourceforge.net/docs/tutorial.html#part-4-use-of-spacers
>
> (And, attaching files is usually better than pasting contents. It's a
> pain to restore files from messages.)
>
> Regards,
> Dietmar
_______________________________________________
wxGlade-general mailing list
wxGlade-general-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
https://lists.sourceforge.net/lists/listinfo/wxglade-general
wxgalde-hyperlink-alignment.pdf
(application/pdf, 21.4 KB) - not displayed