View previous topic :: View next topic |
Author |
Message |
dE_logics Advocate
Joined: 02 Jan 2009 Posts: 2253 Location: $TERM
|
Posted: Thu May 16, 2013 6:26 am Post subject: get/set GTK widget properties. |
|
|
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. _________________ My blog |
|
Back to top |
|
|
_______0 Guru
Joined: 15 Oct 2012 Posts: 521
|
Posted: Fri May 17, 2013 3:24 pm Post subject: |
|
|
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 |
|
|
dE_logics Advocate
Joined: 02 Jan 2009 Posts: 2253 Location: $TERM
|
Posted: Sun May 19, 2013 2:59 pm Post subject: |
|
|
_______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. _________________ My blog |
|
Back to top |
|
|
|
|
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
|
|