LISTVIEW HELP - SOLVE MY PUZZLE PLEASE 
Author Message
 LISTVIEW HELP - SOLVE MY PUZZLE PLEASE

Some thing is seriously wrong here I have spent hours going over why this
wont work can anybody help me.

.STARTLABELEVENT method just wont work.

Dim lstX As ListItem

    Set lstX = lsvList.ListItems.Add(, "NEW LIST ITEM KEY", "NEW LIST ITEM
TEXT")

      lsvList.EditMode=tvwManual

    Set lsvList.SelectedItem = lsvList.ListItems(lstX.Index)
    lsvList.StartLabelEdit

The lsvList_BeforeLabelEdit(Cancel As Integer) Event is even fireing.



Fri, 06 Oct 2000 03:00:00 GMT  
 LISTVIEW HELP - SOLVE MY PUZZLE PLEASE

See comments below...

Hope this helps,
Tom.

On Mon, 20 Apr 1998 16:28:05 -0000, "Kane Sherlock"

Quote:

>Some thing is seriously wrong here I have spent hours going over why this
>wont work can anybody help me.

>.STARTLABELEVENT method just wont work.

>Dim lstX As ListItem

>    Set lstX = lsvList.ListItems.Add(, "NEW LIST ITEM KEY", "NEW LIST ITEM
>TEXT")

>      lsvList.EditMode=tvwManual

   What do "EditMode" and "tvwManual" have to do with Listview ?

Quote:

>    Set lsvList.SelectedItem = lsvList.ListItems(lstX.Index)
>    lsvList.StartLabelEdit

>The lsvList_BeforeLabelEdit(Cancel As Integer) Event is even fireing.

Anyway, this should do it:

    lsvList.SetFocus
    lsvList.StartLabelEdit



Fri, 06 Oct 2000 03:00:00 GMT  
 LISTVIEW HELP - SOLVE MY PUZZLE PLEASE

Quote:

>Some thing is seriously wrong here I have spent hours going over why this
>wont work can anybody help me.
[code]
>      lsvList.EditMode=tvwManual

You might want to try lvwManual... AFAIK, any constants with a tvw prefix
apply to TreeView controls, not ListView controls.

--
My e-mail address may have 2 bugs in it; deBUG to reply.

Damit Senanayake
Damit's Home; http://web.singnet.com.sg/~apesena/
ICQ UIN: 6930718

"It's one small step for man, one giant leap for mankind." -- Neil Armstrong



Fri, 06 Oct 2000 03:00:00 GMT  
 LISTVIEW HELP - SOLVE MY PUZZLE PLEASE

Quote:
>Dim lstX As ListItem
>    Set lstX = lsvList.ListItems.Add(, "NEW LIST ITEM KEY", "NEW LIST ITEM
TEXT")
>    lsvList.EditMode=tvwManual
>    Set lsvList.SelectedItem = lsvList.ListItems(lstX.Index)
>    lsvList.StartLabelEdit

Try it this way ...

< --- code begins here --->

Private Sub Form_Activate()
    ListView1.SetFocus
    ListView1.StartLabelEdit
End Sub

Private Sub Form_Load()
    ListView1.LabelEdit = lvwManual
    ListView1.ListItems.Add , "item1", "New Item Text"

    ListView1.SelectedItem = "item1"
End Sub

Private Sub ListView1_BeforeLabelEdit(Cancel As Integer)
    Debug.Print ListView1.SelectedItem
End Sub

< --- code ends here --->

It seems you need an extra listview.setfocus to get the job done ...
And you must put the call in the form_Activate, because you can't call the
setfocus from the form_Load event.

hope this solves your problem ...
greetz
Christophe VG



Sat, 07 Oct 2000 03:00:00 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. LISTVIEW HELP - SOLVE MY PUZZLE PLEASE

2. LISTVIEW HELP - SOLVE MY PUZZLE PLEASE

3. PLEASE HELP, PLEASE HELP, PLEASE HELP, PLEASE HELP, PLEASE HELP, PLEASE HELP, PLEASE HELP,

4. Can you solve this puzzle?

5. Solving Puzzles

6. solve this puzzling paradox...

7. solve this puzzling paradox...

8. WordSearch puzzle help please

9. Puzzling File Problems-Please Help

10. Help me to solve the problem please!

11. Please help solving a JScript to VBScript conversion for asp

12. Please help me solve this simple question...

 

 
Powered by phpBB® Forum Software