On Sat, 10 Jan 2009 23:57:00 +0100, Henk-Jan van Tuyl <hjgt...@chello.nl>  
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/
--



------------------------------------------------------------------------------
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
_______________________________________________
wxhaskell-devel mailing list
wxhaskell-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wxhaskell-devel

Reply via email to