ACC2000: Overlapping List Box Controls Show Through One AnotherID: Q197594
|
When your form has two or more list box controls, one on top of the other, you can see portions of the control on the bottom when you click the one on top.
You can work around this behavior by setting the Visible property of the underlying list box control(s) to False when not in use. The following example uses a command button to toggle the Visible properties of two list box controls.
Form: frmListBox
------------------------
Caption: Test List Boxes
List Box:
Name: List0
RowSource: Employees
ColumnCount: 2
ColumnWidths: .25";1"
Visible: Yes
Left: 1"
Top: .25"
Width: 1.75"
Height: 1.3"
List Box:
Name: List2
RowSource: Customers
ColumnCount: 2
ColumnWidths: 0";1.25"
Visible: No
Left: 1"
Top: .25"
Width: 1.75"
Height: 1.3"
Command Button:
Name: Command0
Caption: Toggle Boxes
OnClick: [Event Procedure]
Private Sub Command0_Click
'Toggle the Visible property of each list box
List0.Visible = Not List0.Visible
List2.Visible = Not List2.Visible
End Sub
Microsoft has confirmed this to be a problem in the Microsoft products listed at the beginning of this article.
Private Sub Command0_Click
' Toggle the Visible property of the top list box
List2.Visible = Not List2.Visible
End Sub
Additional query words: see through transparent pra
Keywords : kbdta FmsCmbo
Version : WINDOWS:2000
Platform : WINDOWS
Issue type : kbbug
Last Reviewed: July 15, 1999