From: Arjan v. I. <af...@cs...> - 2005-10-09 11:45:45
|
Hello Malcolm, > Does anyone know anything about Graphics.UI.WXCore.Draw.getTextExtent? > It does not work as I expected from the documentation. I don't think it can handle multiple lines, you will have to multiply the line height with the number of lines yourself. The '\n' symbols in a string are probably simply seen as funny characters. This is quite common in GUI libraries (unfortunately). > Maybe related to this, drawText only draws the first line of the > string as well. Yes, you will have to draw each line separately and compute the changing y coordinate yourself. But, of course, with Haskell you will be able to build a nice abstraction... :-) > And another question: how do I change the colour of drawn text? > Adding options like > [ penColor := ... ] > [ brushColor := ... ] > doesn't seem to have any effect. textColor :: Attr w Color textBgcolor :: Attr w Color Regards, Arjan |