Maximum X Position for Items in Large Custom Dialog BoxesLast reviewed: July 30, 1997Article ID: Q94717 |
The information in this article applies to:
SUMMARYWhen 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.
STATUSMicrosoft 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 ProblemThe 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 MAINOver = 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 SubKbcategory: kbusage kbmacro KBSubcategory: |
Additional query words: winword2 2.0 2.0a 2.0a-CD 2.0b 2.0c custom
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |