Search code examples
haskellwxhaskell

Set display font family in wxhaskell?


I'm trying to build a little program to learn some wxHaskell, a haskell library for wxwidgets.

It would be beneficial for this particular one if I could set the font of a text field to monospaced, but I have no idea how to do that if it is possible.

In wxwidgets there seems to be setFamily and wxFONTFAMILY_TELETYPE, but I can't find anything about this being implemented in wxHaskell, nor how to use it if it were.

Is it possible to do this?


Solution

  • Here's an example, in the change the line in the Hello, World program in the wxHaskell Quick Start from:

      = do f    <- frame    [text := "Hello!"]
    

    to

      = do f    <- frame    [text := "Hello!", font := fontFixed]
    

    Found this by digging down in the docs here