Forum: wxRuby xrc file and WxGrid

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
45196398e9685000d195ec626d477f0e?d=identicon&s=25 Thomas Sawyer (7rans)
on 2009-03-19 19:13
(Received via mailing list)
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:

  <object class="sizeritem">
    <option>1</option>
    <flag>wxALL</flag>
    <border>5</border>
    <object class="wxGrid" name="grid_videos" />
  </object>

Does XRC not handle Wx::Grid properties?

~Trans.
3396e4a3df8a840faec520af8555a400?d=identicon&s=25 Mario Steele (Guest)
on 2009-03-19 19:49
(Received via mailing list)
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
45196398e9685000d195ec626d477f0e?d=identicon&s=25 Thomas Sawyer (7rans)
on 2009-03-19 21:10
(Received via mailing list)
Attachment: epony.xrc (10 KB)
Attachment: epony.fbp (100 KB)
Attachment: epony.rb (2 KB)
Attachment: search.gif (145 Bytes)
2009/3/19 Mario Steele <mario@ruby-im.net>:
> 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.
45196398e9685000d195ec626d477f0e?d=identicon&s=25 Thomas Sawyer (7rans)
on 2009-03-20 19:09
(Received via mailing list)
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.
28df70e0163c43e9f3b7ede657a17853?d=identicon&s=25 Scott Thorpe (sthorpe)
on 2009-03-20 23:52
Thomas Sawyer 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
45196398e9685000d195ec626d477f0e?d=identicon&s=25 Thomas Sawyer (7rans)
on 2009-03-21 01:18
(Received via mailing list)
Attachment: xepony.rb (4 KB)
On Fri, Mar 20, 2009 at 6:52 PM, Scott thorpe <lists@ruby-forum.com>
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.
45196398e9685000d195ec626d477f0e?d=identicon&s=25 Thomas Sawyer (7rans)
on 2009-03-21 01:20
(Received via mailing list)
On Fri, Mar 20, 2009 at 8:14 PM, Trans <transfire@gmail.com> 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!!! ;-)

T.
This topic is locked and can not be replied to.