# Gtk::ComboBox and enable drop down via button click

**URL:** <https://www.ruby-forum.com/t/gtk-combobox-and-enable-drop-down-via-button-click/73638>\
**Category:** Ruby-Gnome 2\
**Created:** [October 25, 2006, 9:50pm UTC](https://www.ruby-forum.com/t/gtk-combobox-and-enable-drop-down-via-button-click/73638 "2006-10-25T21:50:39Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![quik77](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/q/dec6dc/32.png) [@quik77](https://www.ruby-forum.com/u/quik77)\
**Post date:** [October 25, 2006, 9:50pm UTC](https://www.ruby-forum.com/t/gtk-combobox-and-enable-drop-down-via-button-click/73638/1 "2006-10-25T21:50:39Z")

</div>

Hello,

First, thanks for answering some of my questions before.  
I was able to send commands to a VTE terminal using:

```
vte_terminal.feed_child("ls\n")

```

Now, to a new question, to Gtk::ComboBox.

Is there a way to open the dropdown box without  
clicking on the arrow?  
Specifically, I would like to open the dropdown box  
whenever the combo\_box is clicked:

combo\_box.signal\_connect(“event”) do |widget, event|  
case event.event\_type  
when Gdk::Event::BUTTON\_PRESS  
# now open the dropdown menu as if the user  
# would have clicked the arrow  
end  
end

However the wiki docu at  
[http://ruby-gnome2.sourceforge.jp/hiki.cgi?Gtk%3A%3AComboBox](http://ruby-gnome2.sourceforge.jp/hiki.cgi?Gtk%3A%3AComboBox)  
does not seem to hint at doing this.

Regards,  
“shev”

–

* * *

Get your free email from [http://www.linuxmail.org](http://www.linuxmail.org)

Powered by Outblaze

* * *

Using Tomcat but need to do more? Need to support web services,  
security?  
Get stuff done quickly with pre-integrated technology to make your job  
easier  
Download IBM WebSphere Application Server v.1.0.1 based on Apache  
Geronimo  
[http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642](http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642)

---

<div class="post-metadata">

**Author:** ![quik77](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/q/dec6dc/32.png) [@quik77](https://www.ruby-forum.com/u/quik77)\
**Post date:** [October 26, 2006, 3:33am UTC](https://www.ruby-forum.com/t/gtk-combobox-and-enable-drop-down-via-button-click/73638/2 "2006-10-26T03:33:06Z")

</div>

Hi,

2006/10/26, Roebe XXX [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid):

> Now, to a new question, to Gtk::ComboBox.
> 
> Is there a way to open the dropdown box without  
> clicking on the arrow?

Use Gtk::ComboBox#popup.

> Specifically, I would like to open the dropdown box  
> whenever the combo\_box is clicked:

I think this is a default behavior.

## Thanks,

kou

* * *

Using Tomcat but need to do more? Need to support web services,  
security?  
Get stuff done quickly with pre-integrated technology to make your job  
easier  
Download IBM WebSphere Application Server v.1.0.1 based on Apache  
Geronimo  
[http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642](http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642)
