|
August 18, 2001 The Dialog Box's Position Tips: August 2001
Yehuda Shiran, Ph.D.
|
|
By default, a dialog box is centered
within the desktop. This is the default of the center
property. Notice
where the window opens when center
is set to no.
The possible values of the center
property are: yes,
no,
1,
0,
on,
and off.
Their semantics are intuitive. This is how we turned off centering of the above
window:
The window opens close to the upper-left corner of the desktop. You can control the specific location of the window with the dialogLeft and dialogTop parameters. Let's position our window 300 pixels and 500 pixels to left and top, respectively, of the upper-left corner of the desktop:
Even if you do center the window, its position specifications (dialogLeft and dialogTop) override the centering request. Try it:
For more on modal and modeless dialog boxes, go to Column 90, Modal and Modeless Dialog Boxes.
People who read this tip also read these tips: Look for similar tips by subject: |