• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 533
  • Last Modified:

using gtk_entry_get_text in a Glade text widget

I just started using Glade and GtkBuilder, and I am not sure why I am unable to get the text entered in an Entry widget.

Here is my GtkBuilder file:


I have a library file that is in charge of displaying the UI from the XML file above, as well as its handler.


When debugging, I check the values returned from gtk_entry_get_text() in the 'username' and 'password' variables, and they are always empty strings.

If anyone has insight into what I am missing, that would be great.
  • 2
1 Solution
Would you mind to send us compilable code? One has to setup all things to just get it compiled and than it is not even run...
sctccommAuthor Commented:
Actually, I was able to figure out what was wrong.

I was using the builder file again to retrieve the GtkEntry.  But when doing this it does not point to the widgets already created, instead it creates new widgets.

That was the problem.
sctccommAuthor Commented:
This is the problem that caused the issue that I reported.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

A proven path to a career in data science

At Springboard, we know how to get you a job in data science. With Springboard’s Data Science Career Track, you’ll master data science  with a curriculum built by industry experts. You’ll work on real projects, and get 1-on-1 mentorship from a data scientist.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now