On Sat, 10 Jan 2009 23:57:00 +0100, Henk-Jan van Tuyl <hj...@ch...>
wrote:
>
> L.S.,
>
> I created a bitmapButton as follows:
>
>> ok <- bitmapButton f [ on command := close f, picture :=
>> "button62.gif", text := "Ok" ]
>
> The picture is not shown in full; how can I get this correct? I found
> out that wxPython has wx.BU_EXACTFIT to make the button exactly the size
> of the image; is there anything like that in wxHaskell?
>
I have found that wxHaskell defines wxBU_EXACTFIT, but I have found no way
to use it. A way get an exact fit is:
> bitmapSize <- WXCore.withBitmapFromFile "button63.gif"
> WXCore.bitmapGetSize
> bmb <- bitmapButton f [ on command := close f
> , picture := "button63.gif"
> , outerSize := bitmapSize
> ]
My suggestion is, that a new attribute is defined for bitmapButton:
exactFit :: Attr w Bool
When this is set to true, the size of the button should be set to the size
of the image.
With this new attribute, the above code would become:
> bmb <- bitmapButton f [ on command := close f
> , picture := "button63.gif"
> , exactFit := True
> ]
--
Regards,
Henk-Jan van Tuyl
--
http://functor.bamikanarie.com
http://Van.Tuyl.eu/
--
|