|
-
Feb 9th, 2012, 11:12 AM
#1
Re: EnsureVisible in ListView
fafalone.... um... that may work... but I don't think that is what's needed...
pinguinito -- you need to set the selected item to the new item, then make the ITEM ensurevisible....
against my better judgement.... like this:
Code:
Set objItem = LV_Cliente.ListItems.Add(, , rs(0))
objItem.SubItems(1) = rs!name
objItem.SubItems(2) = rs!age
objItem.SubItems(3) = rs!address
objItem.EnsureVisible
objItem.Selected = True
-tg
-
Feb 9th, 2012, 11:29 AM
#2
Thread Starter
New Member
Re: EnsureVisible in ListView
Last edited by pinguinito; Feb 10th, 2012 at 09:13 AM.
-
Feb 9th, 2012, 04:10 PM
#3
Thread Starter
New Member
Re: EnsureVisible in ListView
I upload the code to see if anyone can help
thank you very much
-
Feb 10th, 2012, 12:03 PM
#4
Thread Starter
New Member
Re: EnsureVisible in ListView
Public IdCliente
Dim i As Integer
Private Sub cmdSave_Click()
On Error GoTo ErrorSub
cnn.Execute "UPDATE cliente set name = '" & Trim(Text1(1)) & _
"', age = '" & Trim(Text1(2)) & _
"', address = '" & Trim(Text1(3)) & _
"' where id_cliente = " & IdCliente & ""
With Form1
.LV_Cliente.SelectedItem.EnsureVisible
For i = 1 To 3
.LV_Cliente.SelectedItem.SubItems(i) = Text1(i)
Next i
End With
DoEvents
Unload Me
Set Form2 = Nothing
Exit Sub
ErrorSub:
MsgBox Err.Description
End Sub
Last edited by pinguinito; Feb 10th, 2012 at 12:19 PM.
Reason: Resolved
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|