Tuesday, August 3, 2010

Layout in wxHaskell

First: wxHaskell. Wow. And still their wx configuration is less than declarative if you ask me. But they've got one pretty neat library that I don't think I've seen elsewhere: Layout. Since layout is currently one of the things bothering me, I think I'll need to spend some quality time with this documentation.

I'm currently leaning towards a really graphically-oriented layout style, like this:
field field1
button one
button two
button three
button four
layout
field1 one
two
three- four
See what I'm doing? Argh, maybe you can't if Blogger swallows my indentation again, but I'm actually lining the names of fields up to indicate they should be aligned. Dashes can be used to extend the real estate of the names if the alignment should be on both left and right, and vertical bars would do the same thing vertically.

This is kind of like the XPM graphics format, that uses characters to represent pixels of different colors. It does require everything on the dialog/frame to have unique names, which is a pretty innocuous requirement, really.

No comments:

Post a Comment