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.
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 On Thu, Mar 19, 2009 at 1:09 PM, Trans <transfire at gmail.com> wrote:> 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. > _______________________________________________ > wxruby-users mailing list > wxruby-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/wxruby-users >-- Mario Steele http://www.trilake.net http://www.ruby-im.net http://rubyforge.org/projects/wxruby/ http://rubyforge.org/projects/wxride/ -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://rubyforge.org/pipermail/wxruby-users/attachments/20090319/9df1f367/attachment.html>
2009/3/19 Mario Steele <mario at 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, > > ~ MarioSure 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. -------------- next part -------------- A non-text attachment was scrubbed... Name: epony.xrc Type: application/octet-stream Size: 11129 bytes Desc: not available URL: <http://rubyforge.org/pipermail/wxruby-users/attachments/20090319/8db88487/attachment-0002.obj> -------------- next part -------------- A non-text attachment was scrubbed... Name: epony.fbp Type: application/x-wxformbuilder Size: 140140 bytes Desc: not available URL: <http://rubyforge.org/pipermail/wxruby-users/attachments/20090319/8db88487/attachment-0001.bin> -------------- next part -------------- A non-text attachment was scrubbed... Name: epony.rb Type: application/octet-stream Size: 2463 bytes Desc: not available URL: <http://rubyforge.org/pipermail/wxruby-users/attachments/20090319/8db88487/attachment-0003.obj> -------------- next part -------------- A non-text attachment was scrubbed... Name: search.gif Type: image/gif Size: 145 bytes Desc: not available URL: <http://rubyforge.org/pipermail/wxruby-users/attachments/20090319/8db88487/attachment-0001.gif>
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.
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 -- Posted via http://www.ruby-forum.com/.
On Fri, Mar 20, 2009 at 6:52 PM, Scott thorpe <lists at ruby-forum.com> wrote:> 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 ?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. -------------- next part -------------- A non-text attachment was scrubbed... Name: xepony.rb Type: application/octet-stream Size: 4143 bytes Desc: not available URL: <http://rubyforge.org/pipermail/wxruby-users/attachments/20090320/d0293987/attachment.obj>
On Fri, Mar 20, 2009 at 8:14 PM, Trans <transfire at gmail.com> wrote:> On Fri, Mar 20, 2009 at 6:52 PM, Scott thorpe <lists at ruby-forum.com> wrote: >> 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.The whole thing would be hysterical if it wasn''t such a pain in my butt!!! ;-) T.