Hi,
My first post here, so here's a brief intro. I'm rather new to Win32::GUI but have built simple GUIs in Java's Swing. I've also programmed the raw WIn32 API a bit in C but am not terribly familiar with laying out text in a dialog, having done that in VC's dialog editor when-ever I can. I should probably also mention I'm legally blind and have to access Windows with a screen reader (the latest beta of Dolphin Supernova). Though using the mouse is possible for me with magnification, I'd like to design my GUIs to be keybord and screen reader accessible. ADditionally, I'd rather keep the my GUI control size, resolution and DPI independent knowing that my current Windows appearance is not exactly standard.

Win32::GUI seems the only Perl GUI library that is fully screen reader and keybord accessible so the choice of GUI lib is easy for me. By the way, my Win32::GUI version installed with PPM appears to be 1.02 (looking inside the PM file).

Enough intros, I guess. I've got some questions on laying out text. THis is fairly basic stuff and has probably been asked a zillion times so feel free to point me to earlier posts. I've read the FAQ and the tutorial, as well as browsing the function reference, a bit. However, I have only done very little coding in Win32::GUI so far.

My question is, how do I know the width and height I should give to controls in order to make all text fit and also have nice spacing between the controls themselves? Petzold uses the font properties average width and height plus external leading in his Windows books. I reckon this will be just fine for labels and I can get this info by asking it from a font object.

But howabout say check boxes? I reckon you'll have to leave space for the check mark and focus rectangle, too, so how do I know how much space these will take exactly? I guess I could initially set up a check box with no label and then compare its height and width against the check box's client area to get this information. Does this also work for the more complex controls say tree and list views or text bocxes?

But I'm still worried about the spacing. By looking at dialogs magnified, I've concluded that there's more than just a bit spacing between vertically layed out check boxes. What do the Win32 interface guidelines say about this? I know Visual Studio let's you situate check boxes all too close to each other and think this might also apply to Win32::GUI if I'm not careful enough.

Lastly, I've been pondering coordinates and spacing too. It would appear to me the Win32::GUI Windows use client coordinates but do the dialogs use dialog units, then? The Win32 API has a function GetDialogBaseUnits but I have not seen it imported in Win32::GUI at all.

I'd also like to know what would be a good strategy for laying out controls vertically or horizontally in the dialog or near the dialog borders? If I'd like to lay out buttons at the bottom or right, for instance, should I use percentages of dialog height or width or is there a better way? Java's layout managers do a wonderful job and I know there's that grid layout for Win32::GUI, but I've yet to check it out. Further more, how much spacing should go between dialog push buttons? I know VC's graphical dialog editor adjusts these things automatically, mostly, so I have never had to consciously think of the spacing that much.

I know there are some fairly advanced tools for WIn32::GUI but I have not truely dived into them. Ironically, the graphical GUI editor is not really keyboard (tab, shift+tab) or screen reader accessible, to the extent that the Visual Studio 6 dialog editor is. Also, writing GUIs in XML seems nice but it would appear it doesn't make laying out the GUI components much easier, apart from automatic resizing.

--
With kind regards Veli-Pekka Tätilä ([EMAIL PROTECTED])
Accessibility, game music, synthesizers and programming:
http://www.student.oulu.fi/~vtatila/

Reply via email to