开发者 https://www.devze.com
2022-12-31 10:35
出处:网络
I\'ve a NULL gtklabel. Upon the occurrence of an开发者_StackOverflow中文版 event, I set a text in this label (with gtk_label_set_text). How can I reset the gtklabel after the event (reset to NULL)?
- I've a NULL gtklabel. Upon the occurrence of an开发者_StackOverflow中文版 event, I set a text in this label (with gtk_label_set_text). How can I reset the gtklabel after the event (reset to NULL)?
- How can I set the max length (characters) of a GtkTextView?
- What's the easiest way to set the distance from the margin of a widget in a GtkTable?
- As I understand from code, you can just use
gtk_label_set_text (label, NULL)
. If that fails for any reason (e.g. earlier version doesn't allow NULL
), just replace it with ""
.
- You cannot, directly. Simplest non-direct approach would be to connect to "insert-text" on the view's
GtkTextBuffer
and g_signal_stop_emission_by_name()
when you don't want the insertion to actually happen. Never did this, so it's just what I'd try, no guarantees it will really work.
- Not quite sure what you mean. You could try using a
GtkAlignment
around your widget and set padding on it — may or may not be what you want.
精彩评论