The xrc_panel looks okay but none of the buttons can be clicked upon
and no mouseover events are triggerd. First I need to klik somewhere
on the xrc_panel and after that, the buttons and mouseover events
work fine. Does anyone know how can I solve this problem?
I've tried all kinds of SetFocus combinations to no avail.
The xrc_panel looks okay but none of the buttons can be clicked upon and no mouseover events are triggerd. First I need to klik somewhere on the xrc_panel and after that, the buttons and mouseover events work fine. Does anyone know how can I solve this problem?
I've tried all kinds of SetFocus combinations to no avail.
Is the frame that the panel is in at the top of the z-order?
···
--
Robin Dunn
Software Craftsman http://wxPython.org Java give you jitters? Relax with wxPython!
Setting frame.Raise() and SetFocus on the panel with the buttons
doesn't do much. Setting focus to one of the buttons, shows that the
button is focused, but mouse clicks still only work after clicking
(somewhere) on the panel itself.
Since all panels (and other widgets) are contained by sizers, it's
rather unlikely that there are overlapping child windows (which can
cause problems with focus according to various posts).
But it's not only the xrc_panel that doesn't 'work', the menubar and
buttons in other panels (that already existed) doesn't work either.
So it looks like some invisible panel is covering the application
stealing events.
···
On Wednesday 28 April 2004 05:37, Robin Dunn wrote:
Remy C. Cool wrote:
> Hello,
>
> My application retrieves XRC (XML) data from a server and loads a
> panel (xrc_panel) into a sizer of an existing (hardcoded) panel.
>
> mypanel(wx.Panel):
>
> def __init__(self, ...):
> self.main_sizer = wx.BoxSizer(wx.VERTICAL)
> ...
> self.init_xrc()
> self.Fit()
> self.main_sizer.SetSizeHints(self)
> self.main_sizer.Layout()
> self.Enable(True)
>
> def init_xrc(self):
> res = xrc.EmptyXmlResource()
> res.LoadFromString(resource_as_string)
> self.main_panel = res.LoadPanel(self, "main_panel")
> self.main_sizer.Add(self.main_panel,1,wx.EXPAND,0)
>
> The xrc_panel looks okay but none of the buttons can be clicked
> upon and no mouseover events are triggerd. First I need to klik
> somewhere on the xrc_panel and after that, the buttons and
> mouseover events work fine. Does anyone know how can I solve this
> problem?
>
> I've tried all kinds of SetFocus combinations to no avail.
Is the frame that the panel is in at the top of the z-order?