#74 NotebookRight: bitmapButton is not shown

confirmed
closed-fixed
nobody
None
5
2013-09-27
2013-09-09
No

samples\contrib\NotebookRight.hs: the bitmapButton is not visible

OS: Windows XP
GHC version: 7.6.3
wxWidgets version: 2.9.5
wxHaskell version: 0.90.1.0 (currently in Github repository)

Discussion

  • Henk-Jan van Tuyl

    This should probably solved by modifying function Graphics.UI.WX.Controls.bitmapButton

    A workaround can be done as follows:
    Replace, in file samples\contrib\NotebookRight.hs, the lines

           ok   <- bitmapButton p1 [picture := "../bitmaps/wxwin16.png",
                                    text := "Ok", on command := logMessage "bitmap button pressed", 
                                    tooltip := "tooltip",
                                    on clickRight := (\pt -> menuPopup file pt p)]
    

    with

           let image = "../bitmaps/wxwin16.png"
           bitmapSize <- withBitmapFromFile image bitmapGetSize
           ok <- 
             bitmapButton p1 
               [picture    := image,
                text       := "Ok",
                on command := logMessage "bitmap button pressed", 
                tooltip    := "tooltip",
                clientSize := bitmapSize,
                on clickRight := (\pt -> menuPopup file pt p)]
    
     
  • Henk-Jan van Tuyl

    This is solved by adding
    windowReLayout bb
    to the definition of bitmapButton (file wx\src\Graphics\UI\WX\Controls.hs).
    The solution is now in the repository.

     
  • Henk-Jan van Tuyl

    • status: open --> closed-fixed
     
  • Henk-Jan van Tuyl

    This was a wxHaskell bug; the solution is in the repository and will be in the next Hackage release.

     

Log in to post a comment.