From: Patrick S. <mai...@st...> - 2005-05-19 09:16:53
|
Hi, Setting the clientSize of a BitmapButton AFTER creation doesn't work for = me. Maybe my layout is the problem, but I don't know what I did wrong. I = have just a simple control panel with the 16 buttons and a statustext. = The buttons are in a list and the layout is set by: WX.set p [ layout :=3D column 5 [ hstretch $ widget statusText , column 4=20 [ row 4 (map widget (take 4 buttons)) , row 4 (map widget (take 4 (drop 4 buttons))) , row 4 (map widget (take 4 (drop 8 buttons))) , row 4 (map widget (take 4 (drop 12 buttons))) ] ] , enabled :=3D panelStatus gSt ais ] Everything else works good. For example to set the visibility of a = button to false after clicking it. Who knows.. Cheers Patrick ----- Original Message -----=20 From: Patrick Scheibe=20 To: wxh...@li...=20 Sent: Saturday, May 14, 2005 9:10 PM Subject: bitmapButton with windows.. Hi, First of all I want to thank all people who worked on the binary = windows release of wxHaskell. Now I can compile my programms without having trouble because I don't = have to compile wxHaskell by myself. Thank you for not forgetting the OpenGl thing :))) Now one question. When I create a bitmapButton, then the button is = resized to the size of the image. On my windows xp box this isn't the = case. The buttons keep their small size and the image borders are cut = away. I tried to convert my png files for the buttons to bmp format and = played with all kind of clientSize, outerSize.. without success. The gtk on linux don't have such problems. Is there a = way to fix it or is there a restriction of the size of images on buttons = on windows? I definitely need some button thing displaying a 60x60 image and react = on clicks... The creation of the buttons is just simple code: bitmapButton p=20 [ picture :=3D ("./Pictures/stone" ++ (show i)++ ".BMP") , on click :=3D (\_ ->(buttSelectStone (id2Stone i) varGP) >>=20 updatePlayerPanel varGP statusText p >>=20 repaint p) , clientSize :=3D sz 90 90] Cheers Patrick |