From: David R. <dr...@jd...> - 2003-10-09 11:49:01
|
It seems that the sizes of basic controls--I've tried buttons and checkboxes aren't getting set properly based on their text. A simple example that shows a problem is if you take the example from the Graphics.UI.WX.Layout documentation, and replace the "quit" with "quit this application now", using wxhaskell 0.3 on macos X I get a button which is too small, so that only "s applicat" is visible. It seems that wxhaskell changes the text after creating a control, but doesn't bother to update the size of the control based on that text. A fix is after creating a control q (or modifying its label) is to call: > bs <- get q bestSize > set q [clientSize := bs] However, I think this really should be done automatically whenever the text is modified. If a user wants to change the text without changing the control's size, the user can do that by hand. Oh yes, and the bug applies to checkboxes as well, which require a whole slew of extra space because they don't set their size according to their text. -- David Roundy http://www.abridgegame.org |