While loading this object using XRC, its showing that error
------- I'm using
Python 2.7.5
wxPython 2.8.12
Can you pl help me in solving this.
Those styles are added for all window types in XRC so I'm not sure what might be causing the problem. However, you really shouldn't need them with wxGrid because scrolling will automatically be enabled when needed to be able to display all the cells.
While loading this object using XRC, its showing that error
------- I’m using
Python 2.7.5
wxPython 2.8.12
Can you pl help me in solving this.
Those styles are added for all window types in XRC so I’m not sure what
might be causing the problem. However, you really shouldn’t need them
with wxGrid because scrolling will automatically be enabled when needed
to be able to display all the cells.
On Tuesday, July 23, 2013 1:25:22 PM UTC-5, విజయ్ భరత్ wrote:
Thanks Mike.
Do you have an example on wxGrid (general table) with XRC + XRCed?
Well, theoretically, the attached should work. However, when I try to pull the XRCCTRL is somehow changing my wx.Grid into a ScrolledWindow. Maybe Robin or someone else can see what’s happening. The XRC code looks right, but I’m getting the wrong widget.
I, too, am facing the same problem with the wxGrid changing to
ScrolledWindow while loading from xrc.
···
On Wed, Jul 24, 2013 at 2:39 AM, Mike Driscoll <kyosohma@gmail.com> wrote:
Hi,
On Tuesday, July 23, 2013 1:25:22 PM UTC-5, విజయ్ భరత్ wrote:
Thanks Mike.
Do you have an example on wxGrid (general table) with XRC + XRCed?
Well, theoretically, the attached should work. However, when I try to pull
the XRCCTRL is somehow changing my wx.Grid into a ScrolledWindow. Maybe
Robin or someone else can see what's happening. The XRC code looks right,
but I'm getting the wrong widget.
I took a look in the wx archive, and this one’s been posed before, with a solution from Robin:
*You need to import wx.grid in your python code. When you do that then
some internal data structures are updated with the type info for the
grid classes, and this info is used when figuring out how to convert a
C++ pointer to a Python object of the right typ for the XRCCTRL return
value. *
Mike, I tried it out on your example (inserted an import wx.grid after the import wx statement) and it worked like a champ.
On Wed, Jul 24, 2013 at 2:39 AM, Mike Driscoll kyosohma@gmail.com wrote:
Hi,
On Tuesday, July 23, 2013 1:25:22 PM UTC-5, విజయ్ భరత్ wrote:
Thanks Mike.
Do you have an example on wxGrid (general table) with XRC + XRCed?
Well, theoretically, the attached should work. However, when I try to pull the XRCCTRL is somehow changing my wx.Grid into a ScrolledWindow. Maybe Robin or someone else can see what’s happening. The XRC code looks right, but I’m getting the wrong widget.
Mike
I, too, am facing the same problem with the wxGrid changing to ScrolledWindow while loading from xrc.
I took a look in the wx archive, and this one’s been posed before, with a solution from Robin:
*You need to import wx.grid in your python code. When you do that then
some internal data structures are updated with the type info for the
grid classes, and this info is used when figuring out how to convert a
C++ pointer to a Python object of the right typ for the XRCCTRL return
value. *
Mike, I tried it out on your example (inserted an import wx.grid after the import wx statement) and it worked like a champ.
–
You received this message because you are subscribed to a topic in the Google Groups “wxPython-users” group.
On Wed, Jul 24, 2013 at 2:39 AM, Mike Driscoll kyosohma@gmail.com wrote:
Hi,
On Tuesday, July 23, 2013 1:25:22 PM UTC-5, విజయ్ భరత్ wrote:
Thanks Mike.
Do you have an example on wxGrid (general table) with XRC + XRCed?
Well, theoretically, the attached should work. However, when I try to pull the XRCCTRL is somehow changing my wx.Grid into a ScrolledWindow. Maybe Robin or someone else can see what’s happening. The XRC code looks right, but I’m getting the wrong widget.
Mike
I, too, am facing the same problem with the wxGrid changing to ScrolledWindow while loading from xrc.
/You need to import wx.grid in your python code. When you do that then
some internal data structures are updated with the type info for the
grid classes, and this info is used when figuring out how to convert a
C++ pointer to a Python object of the right typ for the XRCCTRL return
value. /
/
On Tuesday, July 23, 2013 10:49:48 PM UTC-5, edoxtator wrote:
I took a look in the wx archive, and this one’s been posed before, with a solution from Robin:
*You need to import wx.grid in your python code. When you do that then
some internal data structures are updated with the type info for the
grid classes, and this info is used when figuring out how to convert a
C++ pointer to a Python object of the right typ for the XRCCTRL return
value. *
Mike, I tried it out on your example (inserted an import wx.grid after the import wx statement) and it worked like a champ.
Good catch. I missed that too. I’ll be posting a little article about this on my blog later today so it’s easier to find next time…