Which GUI designer to choose?

Hi Vaclav,

Krjukov Victor wrote:
> Does anybody know about some XRC documentation in the net or even
> some more complete examples?

There's a big demo in wxWindows' contrib/samples/xrc (C++).

OK, I'll we look at it; nevertheless it would be nice to have at least
small wxPython demo; I'll try to write it when I'll learn the subject.

I don't understand what you mean, but sizers certainly _are_ supported
by XRC. I've even more confused by the fact that you yourself use
sizers in the sample you attached. What am I missing?

Well, I haven't explained it clearly, sorry.

It seems that you can define "name" parameter for some objects, like in
        <object class="wxPanel" name="MainPanel">
(here name="MainPanel") and be able later to access this object via
        panel = XRCCTRL(frame, "MainPanel")
call. Nevertheless, XRCed hasn't give me possibility to define name tag
for any of many different sizers object I use; assuming this is a
shortcoming of XRCed, I've manually edited the XRC file and add this
parameter to some sizer, than I tried to use it via the same statement
        sizer = XRCCTRL(frame, "MainSizer")
but that wasn't work - sizer became None after this assignment; that is
why i use
        sizer = frame.GetSizer()
in my code. I'm just wondering if this is a by-design behaviour or am I
miss something.

> - and why all labels in the attached example don't ALIGNED
> vertically (the XRC file was created with XRCed-0.0.8-1).

Because wxALIGN_CENTRE_VERTICAL and wxEXPAND are in conflict. You
can't tell the label to spread over entire area and to center itself
inside it at the same time.

Well, it was my gap in understanding sizers, I agree; of course it
doesn't relate to XRC.

Thanks,

    Victor.

I'd like to propose another alternative - use your favorite HTML editor to
embed widgets in wxHtmlContainers. I have been doing this and so far I am
pleased with the results. The wxPython.lib.wxpTag module shows how to parse
custom tags, and the wxPython demo uses some sample embedded widgets.

I derived some code from wxpTag. While my implementation is not as general
purpose, it shows how you to use HTML tables to create reasonably
sophisticated widget layouts. A sample screenshot, corresponding HTML and
source code is available at http://www.synthed.org.

John

···

-----Original Message-----
From: Krjukov Victor [mailto:VKryukov@ufg.com]
Sent: Wednesday, November 27, 2002 7:31 AM
To: wxPython-users@lists.wxwindows.org
Subject: RE: [wxPython-users] Which GUI designer to choose?

Hi Vaclav,

> Krjukov Victor wrote:
> > Does anybody know about some XRC documentation in the net or even
> > some more complete examples?
>
> There's a big demo in wxWindows' contrib/samples/xrc (C++).

OK, I'll we look at it; nevertheless it would be nice to have at least
small wxPython demo; I'll try to write it when I'll learn the subject.

> I don't understand what you mean, but sizers certainly _are_ supported
> by XRC. I've even more confused by the fact that you yourself use
> sizers in the sample you attached. What am I missing?

Well, I haven't explained it clearly, sorry.

It seems that you can define "name" parameter for some objects, like in
        <object class="wxPanel" name="MainPanel">
(here name="MainPanel") and be able later to access this object via
        panel = XRCCTRL(frame, "MainPanel")
call. Nevertheless, XRCed hasn't give me possibility to define name tag
for any of many different sizers object I use; assuming this is a
shortcoming of XRCed, I've manually edited the XRC file and add this
parameter to some sizer, than I tried to use it via the same statement
        sizer = XRCCTRL(frame, "MainSizer")
but that wasn't work - sizer became None after this assignment; that is
why i use
        sizer = frame.GetSizer()
in my code. I'm just wondering if this is a by-design behaviour or am I
miss something.

>
> > - and why all labels in the attached example don't ALIGNED
> > vertically (the XRC file was created with XRCed-0.0.8-1).
>
> Because wxALIGN_CENTRE_VERTICAL and wxEXPAND are in conflict. You
> can't tell the label to spread over entire area and to center itself
> inside it at the same time.

Well, it was my gap in understanding sizers, I agree; of course it
doesn't relate to XRC.

Thanks,

    Victor.

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

Hi,

Krjukov Victor wrote:

a shortcoming of XRCed, I've manually edited the XRC file and add
this parameter to some sizer, than I tried to use it via the same
statement sizer = XRCCTRL(frame, "MainSizer")
but that wasn't work

That's expected. Sizers are not widgets (or "real objects") and they
don't have name in wxWindows. XRCCTRL (meaning "XRC control") uses
names associated with wxWindow objects and because sizers are
anonymous and not windows at all, it can't find them.

        sizer = frame.GetSizer()

That's correct.

Regards,
Vaclav

- --
PGP key ID: 0x465264C9 (get it from wwwkeys.pgp.net)

Of course it would be nice if sizers, menu items, menus, and menubars could
also have name attributes which would simplify accessing them from the XRC
and normal source code. I like being able to associate a name with an object
in the resource and not have to maintain a disconnected name to id mapping
in the source code, but currently that is only possible with classes derived
from wxWindow.

ka

···

-----Original Message-----
From: Vaclav Slavik

Krjukov Victor wrote:
> a shortcoming of XRCed, I've manually edited the XRC file and add
> this parameter to some sizer, than I tried to use it via the same
> statement sizer = XRCCTRL(frame, "MainSizer")
> but that wasn't work

That's expected. Sizers are not widgets (or "real objects") and they
don't have name in wxWindows. XRCCTRL (meaning "XRC control") uses
names associated with wxWindow objects and because sizers are
anonymous and not windows at all, it can't find them.