-   Linux - Newbie (
-   -   Where does the gtk.entry command save the text entered by the user? (

adhm9009 07-25-2012 04:50 PM

Where does the gtk.entry command save the text entered by the user?
Hi all , I am new to GTK programming so I want to make a password
Program using the command gtk entry but I want to know where does the text
Entered by the user being saved ?
How can I retrieve the text entered by the user ?


RockDoctor 07-25-2012 05:59 PM

Not sure what language you're using, but to the best of my knowledge, gtk entry is not a command. Using a gtk entry to enter some text and store the contents is illustrated by the following code:

  e = Gtk.Entry()
  e.set_text("this is a test")
  my_text = e.get_text()
  print "my_text = ",my_text


adhm9009 07-26-2012 07:04 AM

Thank you for responding but I use GTK with C language and the command
I Am asking about is
GTK-entry- new () ,this command allow the user to enter text
And my question is when the user type text how can I retrieve this text
To perform other operation such like password. Checking ?
If I want to display the text entered by the user what is the command to
Do that


RockDoctor 07-26-2012 07:44 AM

To retrieve the text, you'll still have to use something like

my_entry = gtk_entry_new()
my_text = gtk_entry_get_text(my_entry)

which will return the text in the entry and store it in the variable my_text.

adhm9009 07-27-2012 07:35 AM

Passowrd program with GTK
hello :
thank you guys for helping me, i found your replies very helpful

know i want to write password checking program with GTK in the C language , and i want to use the gtk_entry_new() command.
any one have the code for this program .

many thanks

All times are GMT -5. The time now is 01:10 AM.