Forum: Ruby-Gnome 2 Visual Ruby - implementing multiple ListViews

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.
A03d65ec3d088d266433442d5223717c?d=identicon&s=25 Rob C. (rob_c54)
on 2014-09-07 01:35
I'm really struggling to understand how I may implement a single window
with multiple ListViews.

Using the example http://visualruby.net/site/ListView%20Tutorial.html

I wish to have multiple folder lists within one window. Any help would
be very much appreciated.
0d130f179f85401f248e6ebc2ef8292f?d=identicon&s=25 Eric C. (eric_c)
on 2014-09-23 08:30
Create a new window in glade.  Add 2 vboxes named vbox1 and vbox2.  Then
you can add a listview to each box:

I think this works:

def before_show()
  @vbox1 = VR::ListView.new(hash)
  @vbox2 = VR::ListView.new(hash2)
end

If the = doesn't work then try this:

@builder["vbox1"].add(VR::ListView.new(hash))

This will fill the vboxes with the listviews.  Of course, you may wish
to populate them first.

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