Re: Layout problems when getting widgets from glade file




On May 16, 2009, at 12:27 PM, Cowley Harris wrote:

$vbox1->set_size_request(300, 60);

remembering that it is just a request and may  be ignored.

Actually, size request is used as the widget's minimum size. The layout logic will not shrink the widget below its size request, but may give the widget more space than it requests.

This is more apparent when trying to size a toplevel window; you generally want set_default_size() for that, as the default size will let the user shrink *and* grow the window, while set_size_request() will only let the user grow the window.


--
Of course there are true copper bottomed mistakes, like spelling the word “rabbit” with three m’s, or wearing a black bra under a white blouse, or, to make a more masculine example, starting a land war in Asia.
  -- John Cleese, "The Importance of Mistakes"




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]