FIX: First Item Can Disappear in Outline Control Style 0 or 2 (108659)
The information in this article applies to:
- Microsoft Visual Basic Professional Edition for Windows 3.0
This article was previously published under Q108659 SYMPTOMS
When an Outline custom control has both:
- Style property value of 0 or 2
- Indent property value of 0 on an item
the first visible item in the outline incorrectly disappears when you
initially click any other item at run time. The problem occurs both in
the Visual Basic environment and in compiled EXE files.
By design, the item that has an Indent property of 0 should not display.
However this should not have any effect on the items that do display.
WORKAROUND
The first item reappears as soon as you select it with the mouse or
keyboard. The keyboard interface for the Outline control includes
LEFT ARROW, RIGHT ARROW, UP ARROW, DOWN ARROW, HOME, END, PAGE UP, PAGE
DOWN, plus sign (+), and minus sign (-).
You can prevent the disappearance of the first item as follows:
- Do not use an Indent value of 0 on items in an Outline control that uses
Style property values of 0 or 2. Instead, use an Indent value of 1 or
greater.
or
- Add the Outline1.ListIndex=1 statement after you add all items and
indents to the Outline control. This ListIndex method selects the first
item automatically, working around the problem.
STATUS
Microsoft has confirmed this to be a bug in the Professional Edition of
Microsoft Visual Basic version 3.0 for Windows. This problem has been
corrected in Visual Basic version 4.0.
REFERENCES
"Microsoft Visual Basic Version 3.0: Professional Features Book 1:
Custom Control Reference." See the Outline control, pages 256-257.
Modification Type: | Minor | Last Reviewed: | 1/8/2003 |
---|
Keywords: | kbbug KB108659 |
---|
|