Maximum X Position for Items in Large Custom Dialog Boxes

Last reviewed: July 30, 1997
Article ID: Q94717
The information in this article applies to:
  • Microsoft Word for Windows, versions 2.0, 2.0a, 2.0a-CD, 2.0b, 2.0c, 6.0, 6.0a, 6.0c

SUMMARY

When you create a custom dialog box in Word for Windows, the maximum width is 5000 units. However, if you try to place items, such as buttons or list boxes, beyond 1022 units in the horizontal X position, the items do not appear in the correct location. Instead, they appear approximately 480 units from the edge of the dialog box. Combo boxes display incorrectly when you place items beyond 1014 units in the X position.

STATUS

Microsoft has confirmed this to be a problem in the versions of Microsoft Word for Windows listed above. We are researching this problem, and will post more information here in the Microsoft Knowledge Base as it becomes available.

Steps to Reproduce Problem

The following macro demonstrates that items placed at 1022 units (1014 units for combo boxes) display correctly. After you choose the OK button in the first dialog box, the macro then demonstrates that the same items display incorrectly when placed at 1023 units (1015 units for combo boxes).

Note: Word 6.0 will get a syntax error if a listbox or combobox are declared in the dialog box and an array has not been declared first. Add the following three lines to the macro, after Sub Main below:

       Dim ListBox1$(0), ComboBox1$(0)
       ListBox1$(0)= "List"
        ComboBox1$(0) = "Combo"


Sub MAIN
Over = 1022 comboOver = 1014 For i = 1 To 2 Begin Dialog UserDialog 1200, 434, "Microsoft Word"
   Text 8, 28, 253, 13, "X position =" + Str$(over)
   Text 8, 47, 263, 13, "Combobox X position =" + Str$(comboOver)
   OKButton 6, 68, 88, 21
   ListBox over, 6, 100, 84, ListBox1$(), .ListBox1
   OptionGroup .OptionGroup1
      OptionButton over, 91, 100, 16, "Option Button"
   CheckBox over, 108, 100, 16, "Check Box", .CheckBox1
   GroupBox over, 130, 100, 108, "Group Box"
   ComboBox comboOver, 247, 100, 108, ComboBox1$(), .ComboBox1
   PushButton over, 358, 100, 21, "Text"
End Dialog Dim dlg As UserDialog Dialog dlg Over = 1023 comboOver = 1015 Next
End Sub

Kbcategory: kbusage kbmacro KBSubcategory:


Additional query words: winword2 2.0 2.0a 2.0a-CD 2.0b 2.0c custom
word6 winword option button combobox listbox 6.0
Version : 2.0 2.0a 2.0a-CD 2.0b 2.0c
Platform : WINDOWS


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: July 30, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.