FIX: Visual Basic List Box Won't Open if Resized at Run Time

ID: Q79030


The information in this article applies to:
  • Microsoft Visual Basic Standard and Professional Editions for Windows, version 2.0
  • Microsoft Visual Basic programming system for Windows, version 1.0


SYMPTOMS

When you click the down arrow of the drive list box control, the drive list box will not open if it has been resized at run time. The Width property is Read/Write at run time. However, if it is changed at run time, the drive list box won't open. This is true even if it is restored to its original value before attempting to open it.

Note also that Page 11 of the "Microsoft Visual Basic: Language Reference" version 1.0, says the Height property of the drive list box is Read/Write at run time. Height is actually Read-Only at run time.


STATUS

Microsoft has confirmed this to be a bug in the products listed above. This problem was corrected in Microsoft Visual Basic version 3.0 for Windows.


MORE INFORMATION

Note that neither the directory list box nor the file list box are affected by run-time resizing.

Steps to Reproduce Problem

  1. Click the drive list box control icon on the Toolbox. Draw a drive list box on the form. Resize the drive list box to any size. At run time, the drive list box will correctly open when you click the down arrow.


  2. Add three command buttons to the form, giving them these captions: Narrow, Wider, and Restore.


  3. Insert the following code:

    Note: The example assumes a starting dimension of 2055 wide (user alterable) by 315 high (the standard height in twips).
    
       Sub Command1_Click ()
          drive1.WIDTH = 1025             ' Narrow
       End Sub
    
       Sub Command2_Click ()
          drive1.WIDTH = 4110             'Wider
       End Sub
    
       Sub Command3_Click ()
          drive1.WIDTH = 2055             'Restore
       End Sub 


  4. Run the example.


  5. Open the drive list box. Click the Narrow or Wider button.


  6. Try to open the drive list box again. It fails to open.


  7. Click the Restore button. Again try to open the drive list box. It fails to open.


Additional query words: buglist1.00 docerr buglist2.00 fixlist3.00 2.00 3.00

Keywords :
Version : WINDOWS:1.0,2.0
Platform : WINDOWS
Issue type :


Last Reviewed: January 20, 2000
© 2000 Microsoft Corporation. All rights reserved. Terms of Use.