|
View:
New views
11 Messages
—
Rating Filter:
Alert me
|
|
|
Search in ComboBoxHi,
How can I set a search capability on a Gtk::ComboBox? The Entry box is showed but doesn't work like in a TreeView. Thanks. (o_o) _______________________________________________ gtkmm-list mailing list gtkmm-list@... http://mail.gnome.org/mailman/listinfo/gtkmm-list |
|
|
Search in ComboBoxHi,
How can I set a search capability on a Gtk::ComboBox? The Entry box is showed but doesn't work like in a TreeView. Thanks. (o_o) _______________________________________________ gtkmm-list mailing list gtkmm-list@... http://mail.gnome.org/mailman/listinfo/gtkmm-list |
|
|
Re: Search in ComboBoxHi,What about a gtk entry with autocompletion?
_______________________________________________ gtkmm-list mailing list gtkmm-list@... http://mail.gnome.org/mailman/listinfo/gtkmm-list |
|
|
Re: Search in ComboBoxMartin (OpenGeoMap) wrote:
> What about a gtk entry with autocompletion? Hi Martin! You response to the OP has me curious to know if 'autocompletion' is a member function of the Entry class or if it is of a parent class. I am using Gtkmm 2.10.x under Windows and I have not been able to find such 'Method' in the documentation that came with my installation of Gtkmm. Thanks in advance -- Happiness has many doors, and when one of them closes another opens, yet we spent so much time looking at the one that is shut that we don't see the one that just opened.. _______________________________________________ gtkmm-list mailing list gtkmm-list@... http://mail.gnome.org/mailman/listinfo/gtkmm-list |
|
|
|
|
|
Re: Search in ComboBoxHi there I'm trying to do that same thing, but using a comboboxentry, wich gets the list from a DB. This is my code and it gets the values from the DB and show them as a combolist, but I have no idea of how to add that autocomplete function to that. This is my code so far. widget = "combo_widget" # "combo widget" is a comboboxenty and I0m using glade to create it. self.combo = self.xml.get_widget(widget) self.c.execute("SELECT column FROM table") list = self.c.fetchall() for values in list: self.combo.append_text('%s' % values[0]) Thanks |
|
|
Re: Search in ComboBoxOn Sat, 2008-05-31 at 21:15 -0700, Kosa wrote:
> > You need a entry and also the EntryCompletion class. The widget you can > > see is the gtk::entry > > http://www.gtkmm.org/docs/gtkmm-2.4/docs/reference/html/classGtk_1_1EntryCompletion.html > > > > Hi there > > I'm trying to do that same thing, but using a comboboxentry, wich gets the > list from a DB. > > This is my code and it gets the values from the DB and show them as a > combolist, but I have > no idea of how to add that autocomplete function to that. This is my code so > far. Here is an example of autocompletion with Gtk::Entry. It's not yet in the book. http://svn.gnome.org/viewvc/gtkmm-documentation/trunk/examples/book/entry/completion/ But I don't believe there is any set_completion() function for ComboBoxEntry. It wouldn't make much sense to me - then you'd have a drop-down for completion and a drop-down for the combobox items. -- Murray Cumming murrayc@... www.murrayc.com www.openismus.com _______________________________________________ gtkmm-list mailing list gtkmm-list@... http://mail.gnome.org/mailman/listinfo/gtkmm-list |
|
|
Re: Search in ComboBoxregards. Martin (OPENGeoMap) wrote: _______________________________________________ gtkmm-list mailing list gtkmm-list@... http://mail.gnome.org/mailman/listinfo/gtkmm-list |
|
|
Re: Search in ComboBoxYou are wrong.
EntryCompletetion works perfectly well with ComboBoxEntry. You could use same model - get it from ComboBoxEntry. The entry is part of combo object, just call a method to get it. cmbName = Gtk::manage( new Gtk::ComboBoxEntryText() ); for( XMLManager::VSI it = contList.begin(); it != contList.end(); ++it ) { cmbName->append_text( Glib::locale_to_utf8( *it ) ); } entName = ( Gtk::Entry* )cmbName->get_child(); Glib::RefPtr< Gtk::EntryCompletion > cmpName = Gtk::EntryCompletion::create(); entName->set_completion( cmpName ); cmpName->set_model( cmbName->get_model() ); cmpName->set_text_column( 0 ); В Срд, 04/06/2008 в 16:12 +0200, Martin (OpenGeoMap) пишет: > I think it´s no possible use autocompeltation with comboboxentry. > > regards. > > > > > > Martin (OPENGeoMap) wrote: > > > > > > > What about a gtk entry with autocompletion? > > > > > > > > > > > > > > Hi Martin! > > > > > > > > > > > Here in python a complete sample using autocompletion: > > > > > > entry = gtk.Entry() > > > completion = gtk.EntryCompletion() > > > entry.set_completion(completion) > > > liststore = gtk.ListStore(gobject.TYPE_STRING, gtk.gdk.Pixbuf) > > > completion.set_model(liststore) > > > pixbufcell = gtk.CellRendererPixbuf() > > > completion.pack_start(pixbufcell) > > > completion.add_attribute(pixbufcell, 'pixbuf', 1) > > > # create a gtk.CellRendererText and pack it in the completion. Also set > > > the > > > # 'text' attribute > > > completion.set_text_column(0) > > > # load up the liststore with string - pixbuf data - assuming pixbuf > > > created > > > > > > the same for ruby/gnome, monogtk#, gtkmm, gtk, etc,.. > > > liststore.append(['string text', pixbuf]) > > > > > > > > > You need a entry and also the EntryCompletion class. The widget you can > > > see is the gtk::entry > > > http://www.gtkmm.org/docs/gtkmm-2.4/docs/reference/html/classGtk_1_1EntryCompletion.html > > > > > > > > > > Hi there > > > > I'm trying to do that same thing, but using a comboboxentry, wich gets the > > list from a DB. > > > > This is my code and it gets the values from the DB and show them as a > > combolist, but I have > > no idea of how to add that autocomplete function to that. This is my code so > > far. > > > > > > > > widget = "combo_widget" # "combo widget" is a comboboxenty and I0m using > > glade to create it. > > self.combo = self.xml.get_widget(widget) > > > > self.c.execute("SELECT column FROM table") > > list = self.c.fetchall() > > for values in list: > > self.combo.append_text('%s' % values[0]) > > > > Thanks > > > > _______________________________________________ > gtkmm-list mailing list > gtkmm-list@... > http://mail.gnome.org/mailman/listinfo/gtkmm-list _______________________________________________ gtkmm-list mailing list gtkmm-list@... http://mail.gnome.org/mailman/listinfo/gtkmm-list |
|
|
Re: Search in ComboBoxIt is possible, but as Murray said -- it doesn't make much sense. What would be cool finally, is if we could get the regular ComboBox dropdown act as the completion for a ComoboBoxEntry, something I wanted to be able to use for a while now.
2008/6/4 Martin (OpenGeoMap) <martin@...>:
_______________________________________________ gtkmm-list mailing list gtkmm-list@... http://mail.gnome.org/mailman/listinfo/gtkmm-list |
|
|
Re: Search in ComboBoxI think gtk+ people want deprecate use of private members like vbox from GtkDialog for example. I don´t see visible API for the entry in the GtkComboBoxEntry widget. http://library.gnome.org/devel/gtk/stable/GtkComboBoxEntry.html perhaps murray will make the gtk+ API changes transparent for the gtkmm users. http://developer.imendio.com/sites/developer.imendio.com/files/gtk-hackfest-berlin2008.pdf This in not the official GTK 3 but perhaps it was it. regards.
_______________________________________________ gtkmm-list mailing list gtkmm-list@... http://mail.gnome.org/mailman/listinfo/gtkmm-list |
| Free Forum Powered by Nabble | Forum Help |