I have successfully worked with GtkEntryCompletion for one of my applications, however someone had an interesting request the other day and now I am trying to figure out how to get it done.
My initial set-up is very similar to the following:
http://www.kksou.com/php-gtk2/articles/setup-GtkEntry-with-auto-completion.php Sample Code 179: How to setup GtkEntry with auto completion?
I modified it somewhat to connect to a mysql dbase for the look-up and placed it into a Object Oriented format. The code works great.
Now what if instead of a submit button I want to have the other form fields autofill based on the autocompletion. Other fields from the same table.
I was looking into any signal that may be emitted by the EntryCompletion. I found what I think is a valid signal:
match-selected signal
Callback function
bool callback(GtkEntryCompletion entrycompletion, GtkTreeModelFiltertreemodelfilter);
http://gtk.php.net/manual/en/gtk.gtkentrycompletion.signal.match-selected.php
I am thinking that I could capture that signal and then do the autofilling on the other fields on the form without needing the user to click submit. However this does not work as I am unable to create a function for that signal. is it already built-in, how would one capture it?
My real question is this even possible? I am sure I am overlooking some simple solution as I have been trying various ways without much success.
Thanks.