GTK+ Forums Forum Index GTK+ Forums
Discussion forum for GTK+ and Programming. Ask questions, troubleshoot problems, view and post example code, or express your opinions.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Button Width

 
Post new topic   Reply to topic    GTK+ Forums Forum Index -> GTK+ Programming
Author Message
charIie
Familiar Face


Joined: 08 Jan 2008
Posts: 9

PostPosted: Thu Jan 10, 2008 9:51 pm    Post subject: Button Width Reply with quote

How would one go about setting a specific width for a button?

What is happening is the label in the button will be changing size from time to time, so I want the button size to remain the same.

I've found a way to do it in php:

Code: (C)
1
2
3

button->set_size_request(80, 32);


but that will not work with c.

Thanks

Brian
Back to top
kyle-tk



Joined: 11 Jan 2008
Posts: 3

PostPosted: Fri Jan 11, 2008 2:12 am    Post subject: Reply with quote

gtk_widget_set_size_request(GTK_WIDGET(button), 80, 32);

http://library.gnome.org/devel/gtk/unstable/GtkWidget.html#gtk-widget-set-size-request

-kyle
Back to top
charIie
Familiar Face


Joined: 08 Jan 2008
Posts: 9

PostPosted: Tue Jan 15, 2008 3:44 pm    Post subject: Reply with quote

ah thanks a bunch I was still looking for that
Back to top
Display posts from previous:   
Post new topic   Reply to topic    GTK+ Forums Forum Index -> GTK+ Programming All times are GMT
Page 1 of 1

 


Powered by phpBB © 2001, 2005 phpBB Group
CodeBB 1.0 Beta 2
Protected by Anti-Spam ACP