PDA

View Full Version : listview problem



thebird2363
07-19-2006, 06:59 AM
I have a listview. I want to temporarily put a text box on top of the listview box. How do I make the text box visible?

Cosmos75
07-19-2006, 07:36 AM
Me.MyTextboxName.Visible = TrueI assume that you have the textbox arranged in front of the listbox and that by default it is not visible. Is that the case?

OBP
07-19-2006, 08:06 AM
Don't forget that you can also make the Listview Invisible with the same basic code. To set the textbox to invisible use
Me.MyTextboxName.Visible = False

thebird2363
07-19-2006, 12:08 PM
Sorry, folks. That isn't the problem. I know that the textbox is visible. The problem is that if the text box and the listview box occupy the same location on the form, the list view box has precidence. I also tried using zorder. That didn't work, either.

OBP
07-19-2006, 01:20 PM
Did you try on the Main Menu in design mode, Format>Send to Back
or Bring to Front.
Can you post a zipped copy?

Cosmos75
07-19-2006, 07:22 PM
How about creating a procedure to make only one of them visible and enabled at a time?

Private Sub ListboxActive(blnListbox as Boolean)
Me.ListBox1.Visible = blnListbox
Me.ListBox1.Enabled = blnListbox
Me.TextBox1.Visible = Not blnListbox
Me.TextBox1.Enabled = Not blnListbox
End Sub