From: Daan L. <daa...@xs...> - 2003-10-09 12:10:05
|
Ha, great that you found out how to solve these bugs! I think I once thinkered with spaces etc. on the check boxes because of this. > A fix is after creating a control q (or modifying its label) > is to call: > > > bs <- get q bestSize > > set q [clientSize := bs] It seems to me that wxWindows should handle this automatically, not that the user of a library should be concerned about it. Anyhow, we can add these calls easily to the WX layer. Another problem that I haven't tackled yet is how to set a good "initial" size of window. That is, if I set the clientSize, the window can't be resized to a smaller size. I would like to give a good size hint, but allow smaller sizes too. Thanks for the help, Daan. ps. I am fairly busy with other stuff at the moment. If you feel like it, maybe you can change the WX layer yourself to include your size fixes (and maybe with a little sample). I can than integrate them into the CVS sources (or give you write access) > -----Original Message----- > From: wxh...@li... > [mailto:wxh...@li...] On > Behalf Of David Roundy > Sent: donderdag 9 oktober 2003 13:49 > To: wxh...@li... > Subject: [wxhaskell-users] control sizes not set properly > > > 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 > > > ------------------------------------------------------- > This SF.net email is sponsored by: SF.net Giveback Program. > SourceForge.net hosts over 70,000 Open Source Projects. See > the people who have HELPED US provide better services: Click > here: http://sourceforge.net/supporters.php > _______________________________________________ > wxhaskell-users mailing list wxh...@li... > https://lists.sourceforge.net/lists/listinfo/wxhaskell-users > > |