# Select items in a VBOX?

**URL:** <https://www.ruby-forum.com/t/select-items-in-a-vbox/138029>\
**Category:** Ruby\
**Created:** [May 19, 2008, 5:06pm UTC](https://www.ruby-forum.com/t/select-items-in-a-vbox/138029 "2008-05-19T17:06:21Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![focdesoc](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/f/67e7ee/32.png) [@focdesoc](https://www.ruby-forum.com/u/focdesoc)\
**Post date:** [May 19, 2008, 5:06pm UTC](https://www.ruby-forum.com/t/select-items-in-a-vbox/138029/1 "2008-05-19T17:06:21Z")

</div>

Hi,  
I would like to know how can I select items in a VBOX.  
Right now I have a vertical box inside a scrolled window, where I push  
items (I push progress bars into it).  
So if I push for example 20 progress bars, I can scroll up and down and  
see a vertical list of 20 progress bars.  
What I would like to do is to select each one of those progress bars,  
and be able to perform actions on them (such as stop/resume them, erase  
them from the vbox, etc).  
How can I do it?

Or is there some other structure that I can use to perform that kind of  
actions? I mean, push widgets into it, and then be able to select those  
widgets in order to perform actions on them.

Thanks.

---

<div class="post-metadata">

**Author:** ![focdesoc](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/f/67e7ee/32.png) [@focdesoc](https://www.ruby-forum.com/u/focdesoc)\
**Post date:** [May 19, 2008, 5:58pm UTC](https://www.ruby-forum.com/t/select-items-in-a-vbox/138029/2 "2008-05-19T17:58:07Z")

</div>

OR… I’ve just thought something else: maybe there’s no way to  
select the items from the VBOX, nor any kind of list where you can  
select its items, but it’s the same item -the widget itself- who must  
have the property of being selectionable.

Therefore I wonder, is there some way to make the Progress Bars  
selectionables?

Dunno…

---

<div class="post-metadata">

**Author:** ![focdesoc](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/f/67e7ee/32.png) [@focdesoc](https://www.ruby-forum.com/u/focdesoc)\
**Post date:** [May 19, 2008, 6:24pm UTC](https://www.ruby-forum.com/t/select-items-in-a-vbox/138029/3 "2008-05-19T18:24:43Z")

</div>

-----BEGIN PGP SIGNED MESSAGE-----  
Hash: SHA1

John L. wrote:

| Or is there some other structure that I can use to perform that kind of  
| actions? I mean, push widgets into it, and then be able to select those  
| widgets in order to perform actions on them.

Maybe, maybe not. Which GUI toolkit are you using?

* * *

Phillip G.  
Twitter: [twitter.com/cynicalryan](http://twitter.com/cynicalryan)  
Blog: [http://justarubyist.blogspot.com](http://justarubyist.blogspot.com)

~ - You know you’ve been hacking too long when…  
…you get snail mail, and you think to your self "You have new mail on  
node  
“your\_address” from user “name\_on\_the\_frank”.  
-----BEGIN PGP SIGNATURE-----  
Version: GnuPG v1.4.8 (MingW32)  
Comment: Using GnuPG with Mozilla - [http://enigmail.mozdev.org](http://enigmail.mozdev.org)

iEYEARECAAYFAkgxqaoACgkQbtAgaoJTgL83VwCfSeoI1MIEqiHBgfgH9JsbBUUi  
eZYAn1LgEbggxFHe959i0HzYThXc+VGl  
=dxLK  
-----END PGP SIGNATURE-----

---

<div class="post-metadata">

**Author:** ![focdesoc](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/f/67e7ee/32.png) [@focdesoc](https://www.ruby-forum.com/u/focdesoc)\
**Post date:** [May 19, 2008, 6:29pm UTC](https://www.ruby-forum.com/t/select-items-in-a-vbox/138029/4 "2008-05-19T18:29:56Z")

</div>

Hey!  
Thanks for your answer.  
The toolkit I use is Ruby GTK2, and all I write I get it from this  
website:

> **[The source of https://ruby-gnome.github.io/](https://ruby-gnome.github.io/)**
>
> The source of https://ruby-gnome.github.io/

Cheers

Phillip G. wrote:

> -----BEGIN PGP SIGNED MESSAGE-----  
> Hash: SHA1
> 
> John L. wrote:
> 
> | Or is there some other structure that I can use to perform that kind of  
> | actions? I mean, push widgets into it, and then be able to select those  
> | widgets in order to perform actions on them.
> 
> Maybe, maybe not. Which GUI toolkit are you using?
> 
> * * *
> 
> Phillip G.  
> Twitter: [twitter.com/cynicalryan](http://twitter.com/cynicalryan)  
> Blog: [http://justarubyist.blogspot.com](http://justarubyist.blogspot.com)
> 
> ~ - You know you’ve been hacking too long when…  
> …you get snail mail, and you think to your self "You have new mail on  
> node  
> “your\_address” from user “name\_on\_the\_frank”.  
> -----BEGIN PGP SIGNATURE-----  
> Version: GnuPG v1.4.8 (MingW32)  
> Comment: Using GnuPG with Mozilla - [http://enigmail.mozdev.org](http://enigmail.mozdev.org)
> 
> iEYEARECAAYFAkgxqaoACgkQbtAgaoJTgL83VwCfSeoI1MIEqiHBgfgH9JsbBUUi  
> eZYAn1LgEbggxFHe959i0HzYThXc+VGl  
> =dxLK  
> -----END PGP SIGNATURE-----

---

<div class="post-metadata">

**Author:** ![focdesoc](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/f/67e7ee/32.png) [@focdesoc](https://www.ruby-forum.com/u/focdesoc)\
**Post date:** [May 19, 2008, 7:10pm UTC](https://www.ruby-forum.com/t/select-items-in-a-vbox/138029/5 "2008-05-19T19:10:17Z")

</div>

Hey!  
Thanks for your reply.  
You mean “on\_click” signal or “signal\_connect(“clicked”)”?  
Because for the buttons, I use "signal\_connect(“clicked”)… but that is  
because the buttons have got that function.  
A progressbar has got the function “signal\_connect”? I mean, it’s able  
to be clicked on it?

About “on\_click” dunno exactly what do you mean.

Phillip G. wrote:

> -----BEGIN PGP SIGNED MESSAGE-----  
> Hash: SHA1
> 
> John L. wrote:  
> | Hey!  
> | Thanks for your answer.  
> | The toolkit I use is Ruby GTK2, and all I write I get it from this  
> | website:  
> | [http://ruby-gnome2.sourceforge.jp](http://ruby-gnome2.sourceforge.jp)
> 
> This should have anything you need.
> 
> My memory of GTK2 and its Ruby bindings is a bit murky, but connecting  
> an on\_click signal to the progress-bars should do the trick.
> 
> * * *
> 
> Phillip G.  
> Twitter: [twitter.com/cynicalryan](http://twitter.com/cynicalryan)  
> Blog: [http://justarubyist.blogspot.com](http://justarubyist.blogspot.com)
> 
> Zmodem has bigger bits, softer blocks, and tighter ASCII.  
> -----BEGIN PGP SIGNATURE-----  
> Version: GnuPG v1.4.8 (MingW32)  
> Comment: Using GnuPG with Mozilla - [http://enigmail.mozdev.org](http://enigmail.mozdev.org)
> 
> iEYEARECAAYFAkgxsC4ACgkQbtAgaoJTgL/zcACgoxvPFcvsUk/5zLgmc3K+Nddp  
> cKQAnighNPY0aG2HLRIMsoTu4qiRZVil  
> =94s8  
> -----END PGP SIGNATURE-----

---

<div class="post-metadata">

**Author:** ![focdesoc](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/f/67e7ee/32.png) [@focdesoc](https://www.ruby-forum.com/u/focdesoc)\
**Post date:** [May 19, 2008, 6:52pm UTC](https://www.ruby-forum.com/t/select-items-in-a-vbox/138029/6 "2008-05-19T18:52:47Z")

</div>

-----BEGIN PGP SIGNED MESSAGE-----  
Hash: SHA1

John L. wrote:  
| Hey!  
| Thanks for your answer.  
| The toolkit I use is Ruby GTK2, and all I write I get it from this  
| website:  
| [http://ruby-gnome2.sourceforge.jp](http://ruby-gnome2.sourceforge.jp)

This should have anything you need.

My memory of GTK2 and its Ruby bindings is a bit murky, but connecting  
an on\_click signal to the progress-bars should do the trick.

* * *

Phillip G.  
Twitter: [twitter.com/cynicalryan](http://twitter.com/cynicalryan)  
Blog: [http://justarubyist.blogspot.com](http://justarubyist.blogspot.com)

Zmodem has bigger bits, softer blocks, and tighter ASCII.  
-----BEGIN PGP SIGNATURE-----  
Version: GnuPG v1.4.8 (MingW32)  
Comment: Using GnuPG with Mozilla - [http://enigmail.mozdev.org](http://enigmail.mozdev.org)

iEYEARECAAYFAkgxsC4ACgkQbtAgaoJTgL/zcACgoxvPFcvsUk/5zLgmc3K+Nddp  
cKQAnighNPY0aG2HLRIMsoTu4qiRZVil  
=94s8  
-----END PGP SIGNATURE-----
