Please support our Visual Basic 4 / 5 / 6 advertiser: Programming Forums - DaniWeb Sister Site
Reply

Join Date: Mar 2005
Posts: 71
Reputation: NewVBguy is an unknown quantity at this point 
Solved Threads: 3
NewVBguy NewVBguy is offline Offline
Junior Poster in Training

Listview

 
0
  #1
Mar 17th, 2005
Hi there,
I am using a listview control. After populating the listview, I want my cursor to jump to the last row and make it visible. how can i do that using vb code.
thanks in advance

newvbguy
Reply With Quote Quick reply to this message  
Join Date: Dec 2004
Posts: 2,413
Reputation: Comatose is a jewel in the rough Comatose is a jewel in the rough Comatose is a jewel in the rough Comatose is a jewel in the rough 
Solved Threads: 211
Team Colleague
Comatose's Avatar
Comatose Comatose is offline Offline
Taboo Programmer

Re: Listview

 
0
  #2
Mar 17th, 2005
I have a feeling you are going to need to use API calls, or possibly sendkeys. If you post the code or attach the project, I'll take a look at it, and see if I can't find a way to accomplish it.
Reply With Quote Quick reply to this message  
Join Date: Oct 2006
Posts: 1
Reputation: totigo is an unknown quantity at this point 
Solved Threads: 0
totigo totigo is offline Offline
Newbie Poster

Re: Listview

 
0
  #3
Oct 13th, 2006
Hello Friend!!!! Here is the solution....using EnsureVisible!! Try with this:


Private Sub Form_Load()
With ListView1
.View = lvwReport
.ColumnHeaders.Add , , "TEST"
.ListItems.Add 1, , "5"
.ListItems.Add 1, , "4"
.ListItems.Add 1, , "3"
.ListItems.Add 1, , "2"
.ListItems.Add 1, , "1"
Set .SelectedItem = .ListItems(1)
.SelectedItem.EnsureVisible
End With
End Sub
Reply With Quote Quick reply to this message  
Join Date: Dec 2006
Posts: 2
Reputation: susamudre is an unknown quantity at this point 
Solved Threads: 0
susamudre's Avatar
susamudre susamudre is offline Offline
Newbie Poster

Re: Listview

 
0
  #4
Dec 25th, 2006
Originally Posted by totigo View Post
Hello Friend!!!! Here is the solution....using EnsureVisible!! Try with this:


Private Sub Form_Load()
With ListView1
.View = lvwReport
.ColumnHeaders.Add , , "TEST"
.ListItems.Add 1, , "5"
.ListItems.Add 1, , "4"
.ListItems.Add 1, , "3"
.ListItems.Add 1, , "2"
.ListItems.Add 1, , "1"
Set .SelectedItem = .ListItems(1)
.SelectedItem.EnsureVisible
End With
End Sub
i have used combobox for item name help, i need code and itemname in variable when i select item form bombo and i want to move cursor according to adding word in search tex.
pls help me send me coding at susamudre@yahoo.com
regards
santosh
Reply With Quote Quick reply to this message  
Join Date: Nov 2006
Posts: 848
Reputation: QVeen72 is on a distinguished road 
Solved Threads: 120
QVeen72's Avatar
QVeen72 QVeen72 is offline Offline
Practically a Posting Shark

Re: Listview

 
0
  #5
Dec 25th, 2006
Hi,

Use this code

Visual Basic 4 / 5 / 6 Syntax (Toggle Plain Text)
  1. Private Sub cmdShowList_Click()
  2. With ListView1
  3. .HideSelection = False
  4. .FullRowSelect = True
  5. .View = lvwReport
  6. .ColumnHeaders.clear
  7. .ListItems.clear
  8. .ColumnHeaders.Add , , "CHECKING"
  9. .ListItems.Add , , "1"
  10. .ListItems.Add , , "2"
  11. .ListItems.Add , , "3"
  12. .ListItems.Add , , "4"
  13. .ListItems.Add , , "5"
  14. .SelectedItem = .ListItems(.ListItems.Count)
  15. .SelectedItem.EnsureVisible
  16. End With
  17. End Sub

Regards
Veena
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the Visual Basic 4 / 5 / 6 Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC