[Gtk-sharp-list] CellRendererCombo with completion?

Andreas Suter suter.andreas.sa at gmail.com
Fri Jun 11 17:19:04 EDT 2010


Thank you very much. That's exactly what I was looking for! It works! 
Thanks!

> This is indeed tricky. Ok this is what I think you have to do.
>
> CellRendererCombo render = new CellRendererCombo();
> render.EditingStarted += OnEditingStarted;
>
> void OnEditingStarted( object o, EditingStartedArgs args )
> {
>      if ( args.Editable is Gtk.ComboBoxEntry ) {
>           Gtk.ComboBoxEntry editable = args.Editable as Gtk.ComboBoxEntry;
>           editable.Entry.Completion = new EntryCompletion();
>           // so on so forth
>      }
> }
>
> I think this is close if not the answer you want. I havent tested this 
> though. I got some of this info from 
> http://www.pygtk.org/docs/pygtk/class-gtkcellrenderer.html. Well, hope 
> it helps.
>
> On Fri, Jun 11, 2010 at 12:47 PM, Dantus <suter.andreas.sa 
> <http://suter.andreas.sa>@gmail.com <http://gmail.com>> wrote:
>
>
>     Hi
>     I would like to use a ComboBoxEntry within a NodeView. Google
>     pointed me to
>     a class CellRendererCompletion which was somewhere in a
>     documentation xml.
>     That class does exactly what I want, but for CellRendererText and
>     not for
>     CellRendererCombo. Unfortunatly I failed to use the same idea by
>     implementing my own class CellRendererComboCompletion, which
>     inherits from
>     CellRendererCombo. The problem is, that I only get access to a
>     ComboBox
>     instance like that and not to a ComboBoxEntry instance.
>     According to the docs, it should be possible to do that, but I
>     just don't
>     know how.
>
>     Help is very welcome :-)
>
>     Regards,
>     Dantus
>
>
>     --
>     View this message in context:
>     http://mono.1490590.n4.nabble.com/CellRendererCombo-with-completion-tp2252040p2252040.html
>     Sent from the Mono - Gtk# mailing list archive at Nabble.com.
>     _______________________________________________
>     Gtk-sharp-list maillist  - Gtk-sharp-list at lists.ximian.com
>     <mailto:Gtk-sharp-list at lists.ximian.com>
>     http://lists.ximian.com/mailman/listinfo/gtk-sharp-list
>
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/gtk-sharp-list/attachments/20100611/a98b6100/attachment.html 


More information about the Gtk-sharp-list mailing list