PHP-GTK2 Cookbook Forum
Welcome, Guest
Please Login or Register.    Lost Password?
Re:GtkEntryCompletion to autofill multiple fields? (1 viewing) (1) Guest
Go to bottom Post Reply Favoured: 0
TOPIC: Re:GtkEntryCompletion to autofill multiple fields?


#135
zach (User)
Fresh Boarder
Posts: 3
graphgraph
User Offline Click here to see the profile of this user
GtkEntryCompletion to autofill multiple fields? 5 Years, 1 Month ago Karma: 0  
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.
 
  The administrator has disabled public write access.

#136
zach (User)
Fresh Boarder
Posts: 3
graphgraph
User Offline Click here to see the profile of this user
Re:GtkEntryCompletion to autofill multiple fields? 5 Years, 1 Month ago Karma: 0  
To elaborate even further. I was looking at this
http://www.kksou.com/php-gtk2/articles/populate-form-with-popup-list---Part-1.php

Looking to autofill like that just based off of a GtkEntryCompletion instead.
 
 
Last Edit: 2008/04/02 16:55 By zach.
  The administrator has disabled public write access.

#141
kksou (Admin)
Admin
Posts: 1680
graph
User Online Now Click here to see the profile of this user
Re:GtkEntryCompletion to autofill multiple fields? 5 Years, 1 Month ago Karma: 27  
Hi Zach,

Please take a look at the following sample code:

Sample Code 468: How to setup GtkEntryCompletion with match selected signa - Part 1?

Is this what you have in mind?

Regards,
/kksou
 
 
Last Edit: 2008/04/03 07:53 By kksou.
  The administrator has disabled public write access.
#143
zach (User)
Fresh Boarder
Posts: 3
graphgraph
User Offline Click here to see the profile of this user
Re:GtkEntryCompletion to autofill multiple fields? 5 Years, 1 Month ago Karma: 0  
yes! Thats is exactly what I was looking for. Thank you so much.
 
  The administrator has disabled public write access.



Go to top Post Reply
Powered by FireBoardget the latest posts directly to your desktop

Blog - Forum - Privacy Policy - Contact Us
Links - Classes - Social Business - BPM - Web - General
Copyright © 2006-2013. kksou.com. All Rights Reserved