BUG: Visible Property Malfunctions with ComboBox in Container
Article ID: 161835
Article Last Modified on 12/1/2003
APPLIES TO
- Microsoft Visual FoxPro 3.0 Standard Edition
- Microsoft Visual FoxPro 3.0b Standard Edition
- Microsoft Visual FoxPro 5.0 Standard Edition
- Microsoft Visual FoxPro 6.0 Professional Edition
This article was previously published under Q161835
SYMPTOMS
Attempting to set the Visible property of a container from the Valid event
of a combo box inside the container causes unusual behavior. If you choose
something from the combo box and move off the object, the container
disappears but the combo box remains. The combo box is now inactive.
However, if the combo box merely gains focus with no selection taking
place, the container and its contents become invisible. You can change the
Visible property of the container from a command button located on the form
without difficulty.
RESOLUTION
Place the following command in the LostFocus event of the combo box:
This.Parent.Visible=.F.
Do not attempt to control the Visible property of the container from the
Valid event of the combo box.
STATUS
Microsoft is researching this behavior and will post new information here
in the Microsoft Knowledge Base as it becomes available.
Keywords: kbbug KB161835