Microsoft KB Archive/59515

Option Buttons Not Working in Custom Dialog Boxes

PSS ID Number: Q59515 Article last modified on 02-17-1993

1.00 1.10 1.10a 2.00 WINDOWS

Summary: This article discusses the cause for having one option button activate when selecting an adjacent option button in a Word for Windows custom dialog box. An option button can be placed in custom dialog box in Word for Windows with the following statement OptionButton x, y, dx, dy Text$ where x and y are horizontal and vertical coordinates, dx is the width of the item, dy is the height of the item, and Text$ is the text to appear next to the option button in the dialog box. Ideally, you want the dx and dy (width and height) parameters to be large enough to include the button and associated text, but not large enough to include additional space in the box. These parameters define what can be called the “hot spot” of the given item – the region that will activate the option button when clicked with the mouse. If the “hot spot” (width and height of item) is larger than necessary and it extends into the region of another option button, you may find that trying to select the overlapped item with the mouse actually selects the overlapping item. To correct this, trim down the “hot spot” of the overlapping item in the dialog box to the appropriate dimensions (dx and dy) so that it no longer overlaps the other button.

More Information: The characters in the following macro statement are defined below: OptionButton x, y, dx, dy Text$ 1. x is the horizontal coordinate in 1/8 system font character width units measured from the left side of the dialog box to the left edge of the item. 2. y is the vertical coordinate in 1/12 system font character width units measured from the top of the dialog box to the top of the item. 3. dx is the width of the item in 1/4 system font character width units to include both the button and associated text. 4. dy is the height of the item in 1/8 system font character width units. 5. Text$ is the text (specify in quotation marks) to appear next to the option button in the dialog box.

Additional reference words: w4wmacro 1.00 1.10 1.10a 2.0 2.00