Xrc file and WxGrid


#1

Has anyone any experience with using a XRC file that setsup a Wx::Grid?

I’m using wxFormBuilder, in which I setup a grid in a boxsizer, with
column names and all. But when I render it via Ruby the grid is just a
small empty gray box, and I can’t seem to manipulate it at all. I
tried adding columns, resizing columns, populating it with data, etc.
but still nothing.

I look at the XRC file and see that this is all it is:

1 wxALL 5

Does XRC not handle Wx::Grid properties?

~Trans.


#2

No, wxWidgets and further more wxRuby can use just about any control
defined
through XRC. There’s not much we can tell from that snippet you gave
us.
Could you attach both the XRC and the Ruby files your using to attempt
to
load the Window, with the Grid, that shows the problem of it not
working,
and also please mention what Platform, and Version of Ruby/wxRuby you
are
attempting to use.

Thanks,

~ Mario


#3

2009/3/19 Mario S. removed_email_address@domain.invalid:

No, wxWidgets and further more wxRuby can use just about any control defined
through XRC. There’s not much we can tell from that snippet you gave us.
Could you attach both the XRC and the Ruby files your using to attempt to
load the Window, with the Grid, that shows the problem of it not working,
and also please mention what Platform, and Version of Ruby/wxRuby you are
attempting to use.

Thanks,

~ Mario

Sure thing. I’m running:

Ubuntu 8.04 64-bit (everything is installed via apt-get or rubygems)
WxFormBuilder 3.0.57 (unicode)
ruby 1.8.6 (2007-09-24 patchlevel 111) [x86_64-linux]
wxruby-2.0.0-x86_64-linux

Attached are the files. There are some support files missing so it
won’t run straight away, but remarking out the epony and @client stuff
in on_init should do the trick.

Also, the fbp file might need the search.gif file in an images/
directory to load.

HTH,
T.


#4

FYI. I’ve given up on the XRC file. I went back to doing it all by
hand. Using WxFormBuilder in the interm did help me understand the
controls better though. So that’s a good thing.

So, I finally got my UI working like I want it too. I’m going to blog
about it and demonstrate the bottom up technique I worked out that
makes it much easier to design the interface using wxRuby.

Thanks for the help,
T.


#5

On Fri, Mar 20, 2009 at 6:52 PM, Scott thorpe removed_email_address@domain.invalid
wrote:

T.

I’m sorry. But its kinda funny after opening the files you attached. I
had to giggle.

Just curious. Did you run xrcise ?

I did --once I figured out how to set the subclass of the main frame.
But that blew out with an error too. I’ve attached it. It’s not much
different then what I tried by hand.

T.


#6

Thomas S. wrote:

FYI. I’ve given up on the XRC file. I went back to doing it all by
hand. Using WxFormBuilder in the interm did help me understand the
controls better though. So that’s a good thing.

So, I finally got my UI working like I want it too. I’m going to blog
about it and demonstrate the bottom up technique I worked out that
makes it much easier to design the interface using wxRuby.

Thanks for the help,
T.

I’m sorry. But its kinda funny after opening the files you attached. I
had to giggle.

Just curious. Did you run xrcise ?

–Scott


#7

On Fri, Mar 20, 2009 at 8:14 PM, Trans removed_email_address@domain.invalid wrote:

Thanks for the help,
T.

I’m sorry. But its kinda funny after opening the files you attached. I
had to giggle.

The whole thing would be hysterical if it wasn’t such a pain in my
butt!!! :wink:

T.