Yes indeed. This and the other suggestions help tremendously. Thanks
much. I hope one day to be able to answer some questions on here instead of
just posing them for you binary mercenaries to chop down to size.
Later taters,
Che
----- Original Message -----
From: "Jamal Mazrui" <Jamal.Mazrui@xxxxxxx>
To: <program-l@xxxxxxxxxxxxx>
Sent: Thursday, September 22, 2005 10:58 AM
Subject: [program-l] Re: VB: Laying out items
A google search found the following PDF file containing extensive information on user interface design:
"Official Guidelines for User Interface Developers and Designers " http://www.gpa.etsmtl.ca/cours/gpa789/pdf/OfficialGUI.pdf
I have not done nearly as much GUI programming as some on this list, but an approach that seems to work well for layout works like this. I use integer variables such as iLeft, iTop, iWidth, and iHeight to hold values for the position and size of a control in my code. The function call that creates a control passes these variables as parameters, so I can repeat the same code for the same type of control (because these and other variables are passed rather than literal values).
The coordinate variables are set just before calling the function to create a control. In general (but not always), the next control is placed either to the right of the previous one at the same horizontal level, or below the previous one at a lower horizontal level of the form/dialog. When a new horizontal level is started, controls begin at the left margin, after a horizontal padding factor, and then proceed to the right.
The coordinates for the next control to be placed may be obtained from arithmetic operations on the coordinates for the control that was just created. If the next control is to be placed at the right, then iLeft = iLeft + iWidth + iHorizontalPadding
The iTop variable does not change in this case because the control is at the same horizontal level as its predecessor.
On the other hand, if the next control is to be placed below, then iLeft = iHorizontalPadding
and iTop = iTop + iHeight + iVerticalPadding
I set the iWidth and iHeight variables with common values for the width and hight of each type of control. These tend to be minimum values, however, which may be increased to accomodate text that is longer than usual in the control. When the same control types occupy the same horizontal level, I generally set their width and height dimensions to be the same for visual asthetics--even if some controls do not need as much of a bounding rectangle.
Hope this helps, Jamal
** To leave the list, click on the immediately-following link:- ** [mailto:program-l-request@xxxxxxxxxxxxx?subject=unsubscribe] ** If this link doesn't work then send a message to: ** program-l-request@xxxxxxxxxxxxx ** and in the Subject line type ** unsubscribe ** For other list commands such as vacation mode, click on the ** immediately-following link:- ** [mailto:program-l-request@xxxxxxxxxxxxx?subject=faq] ** or send a message, to ** program-l-request@xxxxxxxxxxxxx with the Subject:- faq
** To leave the list, click on the immediately-following link:- ** [mailto:program-l-request@xxxxxxxxxxxxx?subject=unsubscribe] ** If this link doesn't work then send a message to: ** program-l-request@xxxxxxxxxxxxx ** and in the Subject line type ** unsubscribe ** For other list commands such as vacation mode, click on the ** immediately-following link:- ** [mailto:program-l-request@xxxxxxxxxxxxx?subject=faq] ** or send a message, to ** program-l-request@xxxxxxxxxxxxx with the Subject:- faq