xrced help

Hey all,

I have been playing with XRCed for several hours now and I
just can’t seem to get a grasp on how to align properly. In my
example I am trying to create a dialog that mimics an instant message window
like GAIM.

I am using an htmlwindow for the chat box and underneath a
textbox and a button. I then want a statusbar underneath that. I
can’t get the statusbar to display properly and I can’t get the
button to align right and the textbox to align left but expand. Can
someone who has some extra time build an xrc file of a basic dialog based on
the above? I also want everything to align right if the window is
resized.

Thank you.

Lee

···

No virus found in this outgoing message.

Checked by AVG Free Edition.

Version: 7.5.432 / Virus Database: 268.17.26/670 - Release Date: 2/5/2007 2:04 PM

You can't resize a dialog, you'll need a frame for that.
Other than that the attached XRC should be about what you want.

The main thing you to realize is that you can and should create alignments using BoxSizer's one within the other. The other thing that seems to keep people confused is the difference between wxEXPAND and option = 1.

Here's a simple explanations that might help:

"option = 1" will grow your control in the same orientation as the sizer. If the sizer is horizontal, it will grow horizontally. If it is vertical, it will grow vertically.

wxEXPAND will grow you control in the perpendicular direction to the direction of the sizer. For a horizontal sizer it will grow your control vertically. For a vertical sizer, it will grow the control horizontally.

Also, when you show your frame (using the biohazard button), if you click on the sizers and controls on a tree, you should see a red frame around them. That should help debug these things.

Hope it works out. XRCed is really nice when you get the hang of it.

Lee Connell wrote:

chatclient.xrc (1.22 KB)

···

Hey all,

I have been playing with XRCed for several hours now and I just can’t seem to get a grasp on how to align properly. In my example I am trying to create a dialog that mimics an instant message window like GAIM.

I am using an htmlwindow for the chat box and underneath a textbox and a button. I then want a statusbar underneath that. I can’t get the statusbar to display properly and I can’t get the button to align right and the textbox to align left but expand. Can someone who has some extra time build an xrc file of a basic dialog based on the above? I also want everything to align right if the window is resized.

Thank you.

Lee

--
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.5.432 / Virus Database: 268.17.26/670 - Release Date: 2/5/2007 2:04 PM

Eli,

Thank you very much for the example it definitely has helped out, very eager
to get a handle on using XRCed. I do have the wxpython in action book as
well, so that should provide some guidance as well.

Thank you!!

···

-----Original Message-----
From: news [mailto:news@sea.gmane.org] On Behalf Of Eli GOlovinsky
Sent: Tuesday, February 06, 2007 4:11 PM
To: wxpython-users@lists.wxwidgets.org
Subject: [wxPython-users] Re: xrced help

You can't resize a dialog, you'll need a frame for that.
Other than that the attached XRC should be about what you want.

The main thing you to realize is that you can and should create
alignments using BoxSizer's one within the other. The other thing that
seems to keep people confused is the difference between wxEXPAND and
option = 1.

Here's a simple explanations that might help:

"option = 1" will grow your control in the same orientation as the
sizer. If the sizer is horizontal, it will grow horizontally. If it is
vertical, it will grow vertically.

wxEXPAND will grow you control in the perpendicular direction to the
direction of the sizer. For a horizontal sizer it will grow your control
vertically. For a vertical sizer, it will grow the control horizontally.

Also, when you show your frame (using the biohazard button), if you
click on the sizers and controls on a tree, you should see a red frame
around them. That should help debug these things.

Hope it works out. XRCed is really nice when you get the hang of it.

Lee Connell wrote:

Hey all,

I have been playing with XRCed for several hours now and I just can’t
seem to get a grasp on how to align properly. In my example I am trying
to create a dialog that mimics an instant message window like GAIM.

I am using an htmlwindow for the chat box and underneath a textbox and a
button. I then want a statusbar underneath that. I can’t get the
statusbar to display properly and I can’t get the button to align right
and the textbox to align left but expand. Can someone who has some
extra time build an xrc file of a basic dialog based on the above? I
also want everything to align right if the window is resized.

Thank you.

Lee

--
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.5.432 / Virus Database: 268.17.26/670 - Release Date:
2/5/2007 2:04 PM

--
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.5.432 / Virus Database: 268.17.28/672 - Release Date: 2/6/2007
10:22 AM

--
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.5.432 / Virus Database: 268.17.28/672 - Release Date: 2/6/2007
10:22 AM

Eli,

Did you see a posting earlier I sent about using assigning a variable from
wx.xrc using XRCCTRL? The type is wxHtmlWindow however it is saying it is
of type wxScrollableWindow. I seen previous posts that this was a bug, but
that was back in 2.7, I'm running 2.8.1. I think I can use wxPyTypeCast()
for now, but is there something wrong I'm doing?

···

-----Original Message-----
From: news [mailto:news@sea.gmane.org] On Behalf Of Eli GOlovinsky
Sent: Tuesday, February 06, 2007 4:11 PM
To: wxpython-users@lists.wxwidgets.org
Subject: [wxPython-users] Re: xrced help

You can't resize a dialog, you'll need a frame for that.
Other than that the attached XRC should be about what you want.

The main thing you to realize is that you can and should create
alignments using BoxSizer's one within the other. The other thing that
seems to keep people confused is the difference between wxEXPAND and
option = 1.

Here's a simple explanations that might help:

"option = 1" will grow your control in the same orientation as the
sizer. If the sizer is horizontal, it will grow horizontally. If it is
vertical, it will grow vertically.

wxEXPAND will grow you control in the perpendicular direction to the
direction of the sizer. For a horizontal sizer it will grow your control
vertically. For a vertical sizer, it will grow the control horizontally.

Also, when you show your frame (using the biohazard button), if you
click on the sizers and controls on a tree, you should see a red frame
around them. That should help debug these things.

Hope it works out. XRCed is really nice when you get the hang of it.

Lee Connell wrote:

Hey all,

I have been playing with XRCed for several hours now and I just can’t
seem to get a grasp on how to align properly. In my example I am trying
to create a dialog that mimics an instant message window like GAIM.

I am using an htmlwindow for the chat box and underneath a textbox and a
button. I then want a statusbar underneath that. I can’t get the
statusbar to display properly and I can’t get the button to align right
and the textbox to align left but expand. Can someone who has some
extra time build an xrc file of a basic dialog based on the above? I
also want everything to align right if the window is resized.

Thank you.

Lee

--
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.5.432 / Virus Database: 268.17.26/670 - Release Date:
2/5/2007 2:04 PM

--
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.5.432 / Virus Database: 268.17.28/672 - Release Date: 2/6/2007
10:22 AM

--
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.5.441 / Virus Database: 268.17.33/678 - Release Date: 2/9/2007
4:06 PM

Eli,

Sorry to bug you, I just learned that wx.PyTypeCast is no longer avail.
Maybe this is still a bug?

···

--
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.5.441 / Virus Database: 268.17.33/678 - Release Date: 2/9/2007
4:06 PM

Lee Connell wrote:

Eli,

Did you see a posting earlier I sent about using assigning a variable from
wx.xrc using XRCCTRL? The type is wxHtmlWindow however it is saying it is
of type wxScrollableWindow. I seen previous posts that this was a bug, but
that was back in 2.7, I'm running 2.8.1. I think I can use wxPyTypeCast()
for now, but is there something wrong I'm doing?

You need to import wx.html in your Python code, so the typeinfo for the wxHtml classes is loaded and will be checked when the wrappers are trying to find the type of object to construct and return to you from XRCCTRL.

···

--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!

Robin,

I guess that slipped by the common sense radar :wink:

I've bought your book as well BTW, thank you very much!

···

-----Original Message-----
From: Robin Dunn [mailto:robin@alldunn.com]
Sent: Friday, February 09, 2007 7:12 PM
To: wxPython-users@lists.wxwidgets.org
Subject: Re: [wxPython-users] Re: xrced help

Lee Connell wrote:

Eli,

Did you see a posting earlier I sent about using assigning a variable from
wx.xrc using XRCCTRL? The type is wxHtmlWindow however it is saying it is
of type wxScrollableWindow. I seen previous posts that this was a bug,

but

that was back in 2.7, I'm running 2.8.1. I think I can use wxPyTypeCast()
for now, but is there something wrong I'm doing?

You need to import wx.html in your Python code, so the typeinfo for the
wxHtml classes is loaded and will be checked when the wrappers are
trying to find the type of object to construct and return to you from
XRCCTRL.

--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!

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

--
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.5.441 / Virus Database: 268.17.33/678 - Release Date: 2/9/2007
4:06 PM

--
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.5.441 / Virus Database: 268.17.33/678 - Release Date: 2/9/2007
4:06 PM