Hi! I have a question. I am using the Gtk.EntryCompletion object with a
Gtk.Entry and in a TreeView widget with an editable CellRendererText.

In the CellRenderer's EditingStarted event I set up the Entry with an
EntryCompletion, with an empty model. When the user writes something and
press the Return key, then the client connects to the server to retrieve
some information and populate de EntryCompletion model. To accomplish
this I use the KeyPress event, but that works fine.

My question is how to pop up the EntryCompletion manually. Currently it
works but I don't like the solution. When the model has been populated,
I do this:

<code>
string previousText = entry.Text;
int previousPosition = entry.Position;
entry.Text = String.Empty;
entry.InsertText(previousText);
entry.Position = previousPosition
                        
while (Gtk.Application.EventsPending())
        Gtk.Application.RunIteration();
</code>

Is there a more elegant way to pop up an EntryCompletion? I was trying
to generate a Changed event in the Entry, but first I want to know what
you think.

Thank you!

-- 
Milton Pividori
Blog: http://www.miltonpividori.com.ar
Jabber ID: [email protected]
GnuPG Public Key: gpg --keyserver subkeys.pgp.net --recv-key 0x663C185C

_______________________________________________
Gtk-sharp-list maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/gtk-sharp-list

Reply via email to