With xrced, I defined a frame in which I have some widgets (see attachment).
Then, I load resources in my MainFrame class, and add menubar, toolbar and
status bar:
It works, but the widgets inside the mainframe does not appear. Why ? What Am
I doing wrong ?
Another point: If I try to put accented chars in some widgets (like wxChoice),
xrced freeze if I preview the frame, and can't reload the resource file :o(
With xrced, I defined a frame in which I have some widgets (see attachment).
Then, I load resources in my MainFrame class, and add menubar, toolbar and
status bar:
It works, but the widgets inside the mainframe does not appear. Why ? What Am
I doing wrong ?
In your wxFrame should be wxPanel as a child.
And there you can place all you controls.
Then - load this panel for example like this:
self.panel = XRCCTRL(parent, "MainPanel")
See example on wxWiki.
It's pretty good and get you started.
Another point: If I try to put accented chars in some widgets (like wxChoice),
xrced freeze if I preview the frame, and can't reload the resource file :o(
Setup you xrc encoding.
Hint: Position on root of you xml tree and on right panel enter you
encoding.
Then everything should be okay.
It works. But the dialog can be sized down to zero. Previously, in the frame,
the minimum size of the frame is set by the minimum size of the inside
widgets (I can see the difference within the preview of xrced). Why such
behaviour difference ?
···
On Thursday 16 October 2003 13:40, Igor Prischepoff wrote:
In your wxFrame should be wxPanel as a child.
And there you can place all you controls.
Then - load this panel for example like this:
self.panel = XRCCTRL(parent, "MainPanel")
It works. But the dialog can be sized down to zero. Previously, in the frame,
the minimum size of the frame is set by the minimum size of the inside
widgets (I can see the difference within the preview of xrced). Why such
behaviour difference ?
Well, you can replace wxPanel with wxDialog.
Then it won't be resizing to zero.
Or you can override OnSize event and veto it
if you want minimal size.
I'm not sure about second way.
Never did it actually.
If the panel is defined in the XRC as being a child of the frame then there should be no need to load it separately. Please provide a small sample XRC and application that shows the trouble you are having and we can probably help you come up with a better solution.
--
Robin Dunn
Software Craftsman http://wxPython.org Java give you jitters? Relax with wxPython!
I attached my files. In this example, my widgets are in the frame (no
panel): it does not work.
I tried to add a panel in the xrc, and make all my widgets child of this
panel: it does not work...
But in the preview window of xrced, all is working fine as it is in this
file. It also work with panel, with the difference that the window can be
resized down to zero (but Igor told me how to deal with).
I'm a little bit disapointed how frame/sizer/panel work within xrc. Even
without xrc, it is not always clear: I'm not using wxPython for a long
time. Do I always need a panel as children of the main frame ? It works
without it when I do not use xrc. If you could point me to an elegant
solution...
Thank's,
···
On Friday 17 October 2003 19:34, Robin Dunn wrote:
If the panel is defined in the XRC as being a child of the frame then
there should be no need to load it separately. Please provide a small
sample XRC and application that shows the trouble you are having and we
can probably help you come up with a better solution.
If the panel is defined in the XRC as being a child of the frame then
there should be no need to load it separately. Please provide a small
sample XRC and application that shows the trouble you are having and we
can probably help you come up with a better solution.
I attached my files. In this example, my widgets are in the frame (no panel): it does not work.
There were no files attached.
···
On Friday 17 October 2003 19:34, Robin Dunn wrote:
I tried to add a panel in the xrc, and make all my widgets child of this panel: it does not work...
But in the preview window of xrced, all is working fine as it is in this file. It also work with panel, with the difference that the window can be resized down to zero (but Igor told me how to deal with).
I'm a little bit disapointed how frame/sizer/panel work within xrc. Even without xrc, it is not always clear: I'm not using wxPython for a long time. Do I always need a panel as children of the main frame ? It works without it when I do not use xrc. If you could point me to an elegant solution...
Thank's,
--
Robin Dunn
Software Craftsman http://wxPython.org Java give you jitters? Relax with wxPython!