Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
get/set GTK widget properties.
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
dE_logics
Advocate
Advocate


Joined: 02 Jan 2009
Posts: 2196
Location: $TERM

PostPosted: Thu May 16, 2013 6:26 am    Post subject: get/set GTK widget properties. Reply with quote

I'm using Glade to make the GUI (actually it's made), as a result I don't have much idea about the coding part (in C) neither there are any tutorials which focus on the coding part with Glade, most of them being Python based.

How do you change/set the property of a widget? For e.g. a button label, or read buffer text in an input box?

I've realized that every widget type has a dedicated structure assigned to it, for e.g. Gtkbutton, or GtkEntry, and each widget has properties, e.g. --

https://developer.gnome.org/gtk3/3.2/GtkButton.html#GtkButton.properties

But how do you get or change these properties? The structure of the widget does not have have these elements, as a result you can't GtkEntry.buffer.

So how do you access these properties?

I've noticed these functions --

gtk_button_get_label
gtk_button_set_use_stock
gtk_button_set_image
...

Which may be used to modify the widget properties, but I get --

"(a.out:23415): Gtk-CRITICAL **: gtk_entry_get_text: assertion `GTK_IS_ENTRY (entry)' failed"

on

gtk_entry_get_text(test);

In function --

void test_func(GtkEntry *test)

Where glade is set to run this function and pass "entry2" (in "user data" of the signals tab) on event GtkButton > released.

If this's how you get/set properties, then of what use are the properties as listed in --

https://developer.gnome.org/gtk3/3.2/GtkButton.html#GtkButton.properties

Thankyou for the help, I need this to be fixed quick.
_________________
Buy from companies supporting opensource -- IBM, Dell, HP, Hitachi, Google etc...
Disfavor companies supporting only Win -- Logitech, Epson, Pioneer, Kingston, WD, Yahoo, MSI, XFX, Huawei
My blog
Back to top
View user's profile Send private message
_______0
Guru
Guru


Joined: 15 Oct 2012
Posts: 521

PostPosted: Fri May 17, 2013 3:24 pm    Post subject: Reply with quote

hey, do you mind reviwing your m$$ post? I pm'ed you but it seems that you haven't checked your messages. I need help.

thnks
Back to top
View user's profile Send private message
dE_logics
Advocate
Advocate


Joined: 02 Jan 2009
Posts: 2196
Location: $TERM

PostPosted: Sun May 19, 2013 2:59 pm    Post subject: Reply with quote

_______0 wrote:
hey, do you mind reviwing your m$$ post? I pm'ed you but it seems that you haven't checked your messages. I need help.

thnks


But I responded twice in PM (first time I want sure if it was delivered).

Also -- problem solved.
_________________
Buy from companies supporting opensource -- IBM, Dell, HP, Hitachi, Google etc...
Disfavor companies supporting only Win -- Logitech, Epson, Pioneer, Kingston, WD, Yahoo, MSI, XFX, Huawei
My blog
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum