0

How can I make window maximized on start with wxHaskell ? Thanks for help

Bill the Lizard
  • 398,270
  • 210
  • 566
  • 880
gruber
  • 28,739
  • 35
  • 124
  • 216

1 Answers1

1

I've never used wxHaskell before and have very little experience with wxWidgets, but if you take this line in the HelloWorld.hs example (available in the wxHaskell source distribution):

f  <- frameCreate objectNull idAny "Hello world" rectZero frameDefaultStyle

and change it to this:

f  <- frameCreate objectNull idAny "Hello world" rectZero (frameDefaultStyle .|. wxMAXIMIZE)

the frame is maximized. Note that you also need to add import Data.Bits ((.|.)) for the bitwise or operator.

I've only tested this on Arch Linux with wx-0.12.1.6, but I'd be surprised if it doesn't work elsewhere.

Travis Brown
  • 138,631
  • 12
  • 375
  • 680