Listview - SetFocus and Me.Repaint
Hi,
When you have a form with a listview, the selected items disapeared when you click on any other button. (The items are still selected but you can't see it is) I'm wondering if it is normal ?? To solve this problem, I can write Me.ListView1.SetFocus on every events of the form like: Private Sub MyCheckbox_Click() Me.ListView1.SetFocus End Sub .... Is there a better approach? Also, I have multipage form, so, when I change page, the checkbox deasapear inside the listview. To solve the problem, I wrote: Private Sub MultiPage1_Change() Me.Repaint End Sub Does anyone know the difference between Me.Repaint and SetFocus. I want to be sure the form is refresh. When the focus is off, you cannot see the selected items. Using Me.Repaint seems to be usefull only when you change page. Thanks a lot!! Alex -- Alex St-Pierre |
Listview - SetFocus and Me.Repaint
Alex,
May be need to set the .HideSelection=False. NickHK "Alex St-Pierre" wrote in message ... Hi, When you have a form with a listview, the selected items disapeared when you click on any other button. (The items are still selected but you can't see it is) I'm wondering if it is normal ?? To solve this problem, I can write Me.ListView1.SetFocus on every events of the form like: Private Sub MyCheckbox_Click() Me.ListView1.SetFocus End Sub ... Is there a better approach? Also, I have multipage form, so, when I change page, the checkbox deasapear inside the listview. To solve the problem, I wrote: Private Sub MultiPage1_Change() Me.Repaint End Sub Does anyone know the difference between Me.Repaint and SetFocus. I want to be sure the form is refresh. When the focus is off, you cannot see the selected items. Using Me.Repaint seems to be usefull only when you change page. Thanks a lot!! Alex -- Alex St-Pierre |
All times are GMT +1. The time now is 04:27 PM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com