Hello and welcome to the list :),

While I have not gone in to seek out the GetDialogBaseUnits I do know that most 
of the units we work with in Win32::GUI are pixels, and moreover that between 
dialog buttons/checkboxes it is not *required*, but I would suggest 1-2px 
minimum for clarity. Anything more than 4 pixel begins to look overly spread 
out, when the buttons are intended to be close together.

I'll admit I haven't used the GUI Loft in some time, and never when I have used 
it did I take the opportunity to check for tab/alt-tab navigation. This is One 
of the right places to point out such an item however as Johan does read this 
list time to time. Not that I wouldn't suggest making such a comment directly 
to him via either his mailing list for the Loft, or directly to his contact 
email.

Aside from the obvious facts, Win32::GUI is a rather easy conversion from the 
Windows API, though not all the functions are implemented directly.

Back to your original question on how to make the interface client resolution 
relative, there is no "easy" way to get it all laid out nicely and adjusting 
properly to the windows screen space other than making use of the resizer code 
provided within the Loft/XMLBuilder or the Win32::GUI::Resizer module. The 
Resizer module does provide a clear and easy method for the auto-adjusting of 
the controls of the interface.

As a special note: be sure to set the tab order when creating the contents of 
your dialog considering its potential uses.

I am sure others will be able to help you further, so I will put myself back to 
work (wish I spent more time coding @ work)

Sincerely,

Jason P.


-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Veli-Pekka Tätilä
Sent: Tuesday, December 06, 2005 7:15 AM
To: perl-win32-gui-users@lists.sourceforge.net
Subject: [perl-win32-gui-users] Newbie Qs about Layout and Coordinates

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/ 



-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_idv37&alloc_id865&op=ick
_______________________________________________
Perl-Win32-GUI-Users mailing list
Perl-Win32-GUI-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users
http://perl-win32-gui.sourceforge.net/

Reply via email to