Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
 
  HOME    TRACKER    Visual Basic




Show Last Item Added In Listview.


Hello there! I just wanted to ask if there's any way to display or go to the last item added in a listview. I have this attendance system and it's working out fine. But they want to see that during scanning, their name should be displayed as it's added to the listview. There will be no user intervention by the way as the computer is inside a cabinet with just the barcode scanner the interact with.




View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread
Listview Item Added Event
I was just wondering if there was a way of triggering an event when an item is added to a ListView control.
I am making a server browsing app, and due to the design of it, I need to trigger an event when a new server gets added to the list (so that I can add ping values, etc.)
Would subclassing the control be suitable for this requirement? I'd prefer it if there was another way, because I'm not 100% sure how to subclass a control as I've never had to before, and also because it might either slow down the app considerably or cause it to crash. It queries about 30-50 servers per second, so the method used would need to be as fast as possible.

Thanks.

How To Print Just Added Item To The Listview
I have a Listview when I add item then I press the buttom cmdsave I save the data to the database and the sametime I print all items to the printer

This how I print


Code:


Open "COM1" For Output As #1

Print #1, "VB6 RESTAURANT"
Print #1, "======================================"

For i = 1 To ListView1.ListItems.count
Line = (ListView1.ListItems(i).ListSubItems("Qty") & _
(ListView1.ListItems(i).ListSubItems("Description")))

Print #1, Line
Next i

Print #1, "======================================"





I save the items to the database and print the "Order" if the Order is still open, the user can add new item and can see those items that he save it before but, but here is my question.

How can I Just print the new item that I add to the listview without print the others.

Display Last Added Item In A Listview
What's the equivalent to a msflexgrid's toprow property for a listview?

Listview- Display Most Recent Added Item On Top
Hi,
I have a small problem with listview sorting....coz right now, my most recent added item appears at the most bottom row. And I've this limited area of listview that can only display 4 rows. Thus, when i add more than 4 items, the rest of items does not appear on the listview immediately. So, i have to scroll the vertical bar to locate the last added item.

Wonder if VB provides a function whereby the most recent added item can be displayed at the top of the listview instead. And probably it can also get selected to show that it's the most recent item added(the next feature).

If not, any suggestions?

Thanks

How To Play Wave Sound When An Item Is Added To Listview?
Could any one show me how i can play a wave sound only once when new row is added to listview? The code beleow is used to populate listview.




1 Code:
Private Sub PopulateListview()
Dim objDoc As MSXML2.DOMDocument
Dim objNodelist As IXMLDOMNodeList
Dim objNode As IXMLDOMNode
Dim lvwItem As ListItem


   If objDocCopy Is Nothing Then Exit Sub
    Set objDoc = objDocCopy

       
    'add all the song nodes into a  nodelist
    Set objNodelist = objDoc.selectNodes("//song")
   
   'Clear the listview
    ListView1.ListItems.Clear

    'Loop through each song node and add to the list view
    For Each objNode In objNodelist
        Set lvwItem = ListView1.ListItems.Add(, , objNode.selectSingleNode("artist").Text)
        lvwItem.SubItems(1) = objNode.selectSingleNode("name").Text
        lvwItem.SubItems(2) = objNode.selectSingleNode("image").Text
        lvwItem.SubItems(3) = objNode.selectSingleNode("rating").Text
        'lvwItem.SubItems(4) = objNode.selectSingleNode("songid").Text
        lvwItem.SubItems(4) = objNode.selectSingleNode("totalvotes").Text
        lvwItem.SubItems(5) = objNode.selectSingleNode("page").Text
        lvwItem.SubItems(6) = objNode.selectSingleNode("referrer").Text
        lvwItem.SubItems(7) = objNode.selectSingleNode("pageWindowName").Text
    Next objNode

    Set lvwItem = Nothing
    Set objNodelist = Nothing
   Set objDoc = Nothing
End Sub

Index Of Newly Added Item In Sorted Listview
I need to find the index number of the item last added to a listview.
I can use listcount, except if the user clicks on the column header
and sorts the list, then the next item added could be listed in the
middle of the items already in the list. So .ListCount would not work
in that situation. So if I have a listview with items #1,#2,#3, and
I add an item which is placed in between #1 and #2, how can I find out it's spot in the list????

Any ideas or direction would be very helpful.

Click Item In Listview Then Show That Item In Combo As Index = 0
Hi guys,

I have a listview (lvwUserPunchedOut) that is populated with records in a database (persons first name in one column and last name in the second column), what I am looking to do is if I select a persons name by clicking on it in the listview on frmMain, and then bring up frmSearchCriteria, i would like to show that selected name in the combobox as default (cboEmployee.ListIndex = 0) on frmSearchCriteria (the combobox is sorted = True and is also populated with first name and last name of the person)

How would this be done? Hope I make sense. Thanks in advance.

Show Last Item In Listview
Hello!

I'm using a listview in Excel Form. I'm add some itens manual (users entrys), but when the space defined to the listview ends the add item don't show in listview. The user must have to scroll the listview to see the add item.
It's possible to make automatic scroll of the listview to show the last add item ?
I can make this in the listbox, <userform.listbox1.ListIndex =userform.ListBox1.ListCount - 1 > but I can't make in the listview, because the propertys are diferent. I already try, but I can't do it

Thanks for the Help...

How To Show The Selected Item In A Listview?
I want to be able to show the selected item in a listview. I'll try to explain by an example.

Visible items:

Item 1
Item 2
Item 3
Item 4

Invisible items:

Item 5
Item 6
Item 7
Item 8

Now when I select Item 8 by the use of source code like this:

listview.listitems(8).selected = true

I want to scroll the listview so that the item becomes visible. So how do I scroll the listview to the selecteditem with source?

Show Individual Item In Listview
I have a problem seen the firs column in a listview

If i put

ListView1.ListItems(i).ListSubItems(0)
it gives an error index out of range.

If i put ListView1.ListItems(i).ListSubItems(1) it shows me the item in the second column. how do I see the info in the first one?

Show Picture When Mouse Hovers Over ListView Item
Is there an easy way to show a picture when the mouse is hovering over a specific listview item?

I have been messing around with the listview but wasn't sure if there is an easy way to do this other then fudging it. I.E. setting a picturebox left and top, and visible when mouse is over it.

any preset or premade options with either the listview or another control?

Sort Vba Listbox After New Item Added
I have a listbox which I want to sort after a new item has beed added. My code is as follows:


Code:
With Name
i = .ListIndex
i = i + 1
.AddItem , i
s = InputBox("Please enter name: ")
If s = "" Then
.RemoveItem i
Else
.List(i, 0) = s

.List(i, 1) = s
End If
End With

Dim vaItems As Variant
Dim p As Long, q As Long
Dim vTemp As Variant

vaItems = Me.Name.List
For p = LBound(vaItems, 1) To UBound(vaItems, 1) - 1
For q = p + 1 To UBound(vaItems, 1)
If vaItems(p, 0) > vaItems(q, 0) Then
vTemp = vaItems(p, 0)
vaItems(p, 0) = vaItems(q, 0)
vaItems(q, 0) = vTemp
End If
Next q
Next p

'Clear the listbox
Me.Name.Clear

For p = LBound(vaItems, 1) To UBound(vaItems, 1)
Me.TeamCode.AddItem vaItems(p, 0)
Next p


End Sub

The code works fine until I add the sort code (also found on this forum, I think by Timbo?), it causes a type mismatch error at:
'For p = LBound(vaItems, 1) To UBound(vaItems, 1) - 1'

Any idea what I have done wrong?

Index Of Last Item Added To A Combo Box
I know there's a way to read the index of the last item added to a combo box. Does anyone remember?

thanx/good luck,
adam

Showing The Latest Item Added To A ListBox
Hi,
I have a listbox to which I'm adding new items. The listbox is high enough to show 6 items without having to use the scroll bar.

When the listbox gets more than 6 items, I want it to scroll automatically to the bottom of the list to show the latest items without having user to use the scroll bar.
How do I do this?

Thanks.

Is It Possible To Subclass A Menu Item Added To Another Appliction?
I've tried numerous times, and failed, to gain control of a menu subitem added to a menu in an existing application.

I am trying to create an addon to a program that does not have an exported object model to play with.. I have been able to create a menu item with subitems under it but have been unsuccessful in subclassing the wndproc for these menu items to control them when clicked on.

I am currently using Win2k and VB6 sp3.  Does anyone know of a way to do this?

(I heard of problems w/ setwindowlong replacing windowprocs in 2000 unless the software is part of the same process thread.  I even Tried attaching my process to the other applications process thread, however unsuccessfully).

Thanks in advance.

--NipsMG

Datagrid Doesn't Show A Record That Is Added
I created a VB6 front-end for an Access database. The datagrid does not show records that I "programmatically" add at run-time to the underlying recordset (datasource of the datagrid) unless I close the form with the datagrid and open it again.

My goal: I am trying to create a new record at run-time using data that I select in various controls (e.g. listboxes) on the form, click an "Add" command button and see the newly created record in the datagrid.

I tried datagrid methods such as refresh, rebind, etc. Nothing seems to work.

Determining The Length Of The Longest Item Being Added To A Combo Box
I have no idea if this is possible, but here is what I'm told needs to be done.

I have to add three items to a combo box (ListViews or third party components are not an option).

The second item is the name of an insurance company, which can vary in length.

As the combo is being populated, I need to determine the length of the item, and add the third item one space over. If the next item that is being loaded is the same length or shorter, I need the third item to be loaded in the exact same spot as it was the last time. If the next item being loaded is longer than any previous item, I need to add one to its length and MOVE everything that has been previous loaded over to that location so that at the end of the combo load, the third item lines up in a nice, neat, little row.

I've told my boss that I don't believe this is possible but I want to double check with you guys.

(PS: I have no sample code to post 'cause I wouldn't even know where to start on this one. )

ListBox: Automatically Scroll So Last Item Added Is Shown At Bottom
Maybe listbox is not the best way to do this, but here's what I want:

Program creates log records to display to user what tasks the program is performing. The log records are displayed in chronological order as they are written. Whenever a new record is written, it will be the last one visible within the list box. If the list box can show 4 records, when record 5 is written, you'll see records 2-5 in the list box, when record 6 is written you'll see, records, 3-6 in the list box, etc.

I used SendKeys like so ('li' is the list box index):

If li Mod PageSize = 0 Then
SendKeys "{PGDN}"
End If

But the problem is that if the user interacts with the application at all, this gets messed up. Also, if the app is minimized, then SendKeys affects whatever app the user is currently working with.

In searching the listbox threads I saw a post where the ListBox.SetFocus was done before the SendKeys, but that seems like it that would also interfere if the user had switched to a different app.

Ideas?


Jim

How To Add SubMenus Or Item In A Menu(popup) In Run Time , Need To Added More In List
Hi,

In my project, in a grid control, i list all AreaName, when the user click one Area and Right Click, then ther will be a menu called 'List All Equipment Under This Area', So how can i load All The Equipment Under this menu, when the User selected Area and click 'List All Equipment Under This Area'. I can select them through query , but how i will load them in the Menu. Through code how to do add them in the Menu, may be there will be more the 100 Equipments to be added some times and more over that these Equipments should be added when the user clicks the 'List All Equipment Under This Area', is it possible. Kindly if there is any sample or linkk give me.

Thankyou,
Chock.

Activate ListBox Dbl_Click Event Without Clicking On An Added Item.
Is it possiple to activate the listbox double_click event without clicking on an added item. i.e. if the user dbl clicks anywhere in the listbox. I can only get the event if I dbl click on an added item.

How To Add SubMenus Or Item In A Menu (popup) In Run Time , Need To Added More In The List
Hi,

   In my project, in a grid control, i list all AreaName, when the user click one Area and Right Click, then ther will be a menu called 'List All Equipment Under This Area', So how can i load All The Equipment Under this menu, when the User selected Area and click 'List All Equipment Under This Area'. I can select them through query , but how i will load them in the Menu. Through code how to do add them in the Menu, may be there will be more the 100 Equipments to be added some times and more over that these Equipments should be added when the user clicks the 'List All Equipment Under This Area', is it possible. Kindly if there is any sample or linkk give me.

Thankyou,
Chock.

Listview - Get Last Added Value
Hi,

I have a listview on a form and a textbox. When I enter text in the textbox and hit return it adds it to the listview - no problems so far.

I'm not trying to stop duplicates by checking the last row in the listview and if it's the same as the textbox then disregard it.


VB Code:
If serials.ListItems.Item(serials.ListItems.Count).Text <> serialindiv.Text Then      serials.ListItems.Add , , serialindiv.Text   Else   End If


That's the code I am using now, and I've tried a few variations on it, but still cant get it to work.

Any help would be much appreciated.
Cheers,
Sparky.

Only Unknowns Get Added To My Report Listview.
hey guys I have a listview called report that get items added to it when items in my list6 are clicked.

Now items go in list6 with the code here.


VB Code:
lvwFound2.ListItems.ClearList1.ClearList6.ClearDim X As LongDim Y As Long'Dim intI As IntegerDim FindStr  As StringDim i As Long    Dim SearchPath As String    Dim FileSize As Long    Dim NumFiles As Long, NumDirs As Long    Dim strParts() As String    Dim lngIndex As Long    Dim lngReturn As Long     Dim strToFind As String    Dim lngListIndex As Long'Dim strFT() As String'Dim FindStr   As String'strFT = Split(Text2.Text, ",")'For intI = LBound(strFT) To UBound(strFT)     '   FindStr = strFT(intI)       ' FileSize = FindFilesAPI(SearchPath, FindStr, NumFiles, NumDirs) 'Dim strFT() As String'strFT = Split(Text2.Text, ",")'For intI = LBound(strFT) To UBound(strFT)      '  FindStr = strFT(intI)       ' FileSize = FindFilesAPI(SearchPath, FindStr, NumFiles, NumDirs)'scan.Showscan.Timer1.Enabled = Truescan.Label6.Caption = ".exe"Timer2.Enabled = TrueIf Text16.Text = "ON" ThenAttention.ShowAttention.Label1.Caption = "Autoscan  is already engaged, you must turn off autoscan before running a single scan."Else:         DoEvents    Label19.Caption = "Scanning in progress... Please Wait."    Text10.Text = Text10.Text & vbNewLine & "Scanning in progress...Please Wait.."          'Label7.Caption = "Last antivirus/process scan was at: " & Format(Now, "DD MMM YYYY hh:mm:ss")     TerminateEXE Text2.Text        If Text2.Text = "" Then        Exit Sub       End If        For i = 0 To List1.ListCount - 1'        put in your search here using List1.List(i)    Next    'Text2.Text = "*.*"    'Screen.MousePointer = vbHourglass        'StatusBar1.Panels(1).Text = Label16.Caption    List1.Clear    SearchPath = Text1.Text    FindStr = Text2.Text    FileSize = FindFilesAPI(SearchPath, FindStr, NumFiles, NumDirs)                          ' StatusBar1.Panels(1).Text = Me.lvwFound.ListItems.Count & " Problems found."    '    split'    Dim xxx As String'    lvwFound.ListItems.Add , , "what?"    '    strParts = Split(xxx, "")'    lvwFound.ListItems(1).SubItems(1) = strParts(UBound(strParts))'    List5.AddItem = strParts(UBound(strParts))        ListFiles "C: emp", "*.txt"   ' For i = 1 To 10   ' List1.AddItem "2"'NextDim ixi As Long'For ixi = 0 To List1.ListCount - 1      'If List1.List(i) Like "Update" Then List1.RemoveItem (ixi)  'Next ' All matching elements are removed. In this case, the list is cleared.  'atching elements are removed. In this case, the list is cleared.              For lngIndex = 0 To List1.ListCount - 1        lvwFound2.ListItems.Add , , CStr(lngIndex + 1)        strParts = Split(List1.List(lngIndex), "")        lvwFound2.ListItems(lngIndex + 1).SubItems(1) = strParts(UBound(strParts))    Next              For intI = 1 To lvwFound2.ListItems.Count        strToFind = lvwFound2.ListItems(intI).SubItems(1)        lngReturn = SendMessage(List2.hwnd, LB_FINDSTRINGEXACT, -1&, ByVal strToFind)                If lngReturn >= 0 Then            lngReturn = SendMessage(List6.hwnd, LB_FINDSTRINGEXACT, -1&, ByVal strToFind)                        If lngReturn = LB_ERR Then                List6.AddItem strToFind                              Call LoadReportListview            End If        End If    Next intI        lngListIndex = SendMessage(List6.hwnd, LB_FINDSTRINGEXACT, -1, ByVal "NeroCheck.exe")        If lngListIndex > -1 Then        List6.RemoveItem lngListIndex    End If    '    add search resutlsinto lvwfoudn'    lvwFound.ListItems.Count 1, , Me.List1.List(0), 0, 0'    Me.lvwFound.ListItems.Add Me.lvwFound.ListItems.Count + 1, , Me.List1.List(3), 0, 0       ' labListCount.Caption = "Number of Detected Files Found: " & CStr(List6.ListCount)    'Text10.Text = Text10.Text & vbNewLine & "Scanning Complete, Results are below"    '  Text10.Text = Text10.Text & vbNewLine & labListCount.Caption      '  Label16.Caption = Text3.Text'     List1.Clear    lvwFound2.ListItems.Clear            ''''' do it again+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+  


And the subs I call are here.


Private Sub loadreport()

Dim itmXi As ListItem
Set itmXi = Report.ListItems.Add(, , Label15.Caption)
itmXi.SubItems(1) = Label34.Caption
itmXi.SubItems(2) = Label26.Caption
itmXi.SubItems(3) = Label32.Caption
itmXi.SubItems(4) = Label36.Caption
End Sub

and


VB Code:
Private Sub LoadReportListview()'Label26.Visible = FalseDim con As ADODB.ConnectionDim rs As ADODB.RecordsetDim strSQL As StringDim strCol As StringSet rs = New ADODB.Recordset'Set con = ADODB.ConnectionSet con = New ADODB.Connectioncon.CursorLocation = adUseClient con.Open "PROVIDER=Microsoft.Jet.OLEDB.4.0;Data Source=" & App.path & "DatabaseMain12.mdb;" & "Jet OLEDB:Database Password=omegacron2;"strSQL = "Select NameOfItem, TypeofFile, Severity, Description From Table1 " & _"Where (VirusList = '" & Label15.Caption & "')"rs.Open strSQL, con, adOpenStatic, adLockOptimistic' then when your rs returns...If rs.EOF = True Then  ' might also be able to check if rs.RecordCount=0   Label34.Caption = "Unknown"   Label32.Caption = "Unknown" Else   ' note: use of & vbNullString below prevents errors if a field is null   rs.MoveFirst   Label34.Caption = rs.Fields("NameOfItem") & vbNullString   Label26.Caption = rs.Fields("TypeOfFile") & vbNullString Label36.Caption = rs.Fields("Description") & vbNullStringEnd Ifrs.CloseSet rs = Nothing If Label32.Caption = "" ThenLabel32.Caption = "Unknown"End If If Label15.Caption = "" ThenLabel15.Caption = "Unknown"End If If Label34.Caption = "" ThenLabel34.Caption = "Unknown"End If If Label36.Caption = "" ThenLabel36.Caption = "Unknown"End If If Label26.Caption = "" ThenLabel26.Caption = "Unknown"End If   End Sub


But when the program runs and items get added to list6, only the word "unknown shows up in each of the report listview columsn.

Did I make some sort of big mistake?

thanks!

Stop Duplicating Items From Gettign Added In A Listview
Hey guys I have a listview called report. These items get added froma list6 click event.

But is there a way to prevent duplicate items in the report listview?

Thanks!

Checked Listview Items Get Added To Listdelete Listbox?
hey guys I have a listview called report, but is there a way that since there are checkboxes beside each item , is there a way to get whatever is checked that when it is checked to be added to my listdelete listbox. All I want is the item in the first column of the report listview added.

Thank you!

Menu-Clicked, New TabPage Added With Empty Listview?
k.. let me explain in more details..
currently my window form has a listview on a tabpage.
to enhance on it.. when user select "add" on the menu, it will add a new tabpage with an empty listview on it.
how to do that?

pls help me with this.. i've to submit this to my team leader by next wk..



Edited by - cheryL20 on 8/23/2002 11:58:05 PM

How Do I Show A New Added Record On A Datagrid Locked To A Child Record?
I have 2 datagrids on my form. One locked to the parent table and the other to the child table using the standard Dataenvironment method.
This shows existing child records OK as I change the parent record. When I add a new record to the child table using a separate recordset method, how do I show this addition in the child datagrid? At present I have to stop the program and restart it to see the new record. I've tried all the refresh and rebind thingys I can think of, at the end of my addnew code, without success. I cant find a way of refreshing the child command of the parent in the dataenvironment except in the design mode?
Regards Ted

Listbox: How To Know Last Added Item's Index, When The Listbox Is Sorted?
When sorted property of a listbox is set to True, each new item added won't be at the end of the list, it will be automatically placed in the correct index, according to text order, is there a way to know which is the index of that item (last item added)? Looping to find it would be horrendous, I just need the index to mark that item selected.

Moving A Listview Item And Its Subitems To A New Listview
Hey Guys,

Having a bit of trouble. I am attemping to move a selected item and its subitems from one listview to another. I have no problem getting the contents of the first column, but I can't seem to get the subitems over.

Example: I have this in the first listview:

Code:
|Item |Quanity|Price |PQ |
Bananas 2 $.50 $1.00

Then when I try to move that whole row to the other listview I can only seem to get this:

Code:
|Item |Quanity|Price |PQ |
Bananas

No subitems . Any links or help would be appreciated.

Regards,

Max_Power

Selecting Item In Listbox, Show Related Datas
I have a listbox which lists the names of all items in a table. When I click one of the items, I want the rest of the datas related to that item to show in the other textboxes.
My first problem is that I cant find an event that should fit. All I can find is the listbox_click, but that will be triggered without selecting an item, wont it?
My other problem is that Im not sure how to get datas related to the right item

Show Item Text When Dragging A Treeview Node
Does anybody know how when dragging a treeview node, to display the text property of the node as well as the DragIcon. I want to be able to replate the drag drop behaviour of Windows Explorer, i.e while you are dragging a folder, you can see the folder name in transparent text.

I have no problem setting the DragIcon property from an imageList I have associated with the treeview. For example in the DragOver event I am setting the DragIcon based on whether the mouse is over a valid drop point. E.g. .DragIcon = LoadResPicture("NoDrop", vbResCursor)

However it only shows the DragIcon and nothing else when dragging the node. Any help appreciated.

Select An Item From A Combo Box And Show A Field In A Text Box
How can I display a field in a text box by selecting this field from a combo box. More simply, I have a DB MSACCESS in this db I have a table in this table I have two fields. One field I populate in a combo box, but the second I need to display in a text box. Any time when I select any data from combo box I need to show the second field in a text box. I have this code

Dim dbs as Database
dim rs as RecordSet

Set dbs = Opendatabase("Products")
Set rs = dbs.OpenRecordset("ProdCode", dbOpenDynaset)

Do until rs.EOF
Combo1.AddItem Format (rs!StockNo)
text1 = rs!Product
rs.MoveNext
loop

The code populate de combo, but when I select an Item from the combo doesn't show me the data in the text box. Thank you for your help and support.

Manny

Show Full Name Of A List Item Which's Name Exceeds The Listbox's Width?
I have a list that displays full filenames with paths and all. These names usually get pretty long, and exceed the listbox's width. How can I display their full names without using another label or textbox which will display it when they are selected? Something more like the ControlTipText. Please help.
10x

[Resolved ]How To Show The List Item In Tool Tip With Mouse Movement Over It ? Please Tell
Look at image



As you can see that the list items are having the text more then the list width. So these can not be shon fully. while all the items have diffrent text at end.
Code:
Private Sub Form_Load()
List1.AddItem "ABCDEFGHIJKLMNOPQRST1"
List1.AddItem "ABCDEFGHIJKLMNOPQRST2"
List1.AddItem "ABCDEFGHIJKLMNOPQRST3"
List1.AddItem "ABCDEFGHIJKLMNOPQRST4"
List1.AddItem "ABCDEFGHIJKLMNOPQRST5"
List1.AddItem "ABCDEFGHIJKLMNOPQRST6"
List1.AddItem "ABCDEFGHIJKLMNOPQRST7"
List1.AddItem "ABCDEFGHIJKLMNOPQRST8"
List1.AddItem "ABCDEFGHIJKLMNOPQRST9"
List1.AddItem "ABCDEFGHIJKLMNOPQRST10"
List1.AddItem "ABCDEFGHIJKLMNOPQRST11"
List1.AddItem "ABCDEFGHIJKLMNOPQRST12"
List1.AddItem "ABCDEFGHIJKLMNOPQRST13"
List1.AddItem "ABCDEFGHIJKLMNOPQRST14"
List1.AddItem "ABCDEFGHIJKLMNOPQRST15"
List1.AddItem "ABCDEFGHIJKLMNOPQRST16"
List1.AddItem "ABCDEFGHIJKLMNOPQRST17"
End Sub




Now I want to show the list item text, in the tooltip, at the list Item location, when the mouse move up on to it. The user can scroll the list also. so the valuse will change. Can any please help me.




Edited by - Vishal Agarwal on 2/5/2004 10:27:09 PM

Solved:for The Wizard Geof - Select From Item And Show Data Filtred...
In effect i want to scroll into userform the value from columns of the shseet(all tbox are identified with col_x where x is the letter of column), but:
1) Insert only unique value in combobox1 from column D ( naturally without blank cells)
2) if i select from cbox1 a value for example EXUV, permit the scroll (with scrollbar1) of value in variuos tboxes only if line is identified with EXUV...






Edited by - luca91 on 1/18/2007 3:02:14 AM

Get A Sub Item Of An Item On A ListView
Awhile go I used a Listview before on a project and I remember most of it. There is one thing I am having trouble with though. The list get's populated when the form is loaded. It has 2 headers "Item" and "Number". What I want to do, is when a button is pushed, msgbox the selected items number (In other words the sub item). How do I go about doing that?

How To Get The First Item In A Listview
This should be fairly easy, but for some reason nothing I've tried seems to work. I'm trying to visually pull out certain criteria in a listview. I'm using the following code to change the forecolor of the items in the listview. I can change the subitems, but can't figure out how to change the first item in the row.
Code:
If Trim(Rs![F14]) = "D" Then
For Y = 1 To Lvw1.ColumnHeaders.Count - 1
itmX.ListSubItems(Y).ForeColor = vbBlue
Lvw1.Refresh
Next Y
End If
I thought this would be easy to do. I've tried

lvw1.ListItems(Y).Forecolor (changes the first item in every row)
lvw1.SelectedItem.Forecolor (always changes the first item in the first row)

This has got to be simple enough. Can anyone tell me what I'm missing?

ListView Add Item
Hi

No doubt a nice simple one for someone but I am trying to use the ListView to display a set of records.

Can somebody tell me how to add a value to the listview? I have a recordset and I asume I need to cycle through it adding each value to the listview - but how?

Cheers

ListView Item
When a row is selected in a listview is there a way to get the value which may be in column 3 of the selected row?

Get Item # For Listview
How do I get the number of the item that is selected in the listview?

Listview Add Item
I added a listview to my form and right clicked on it and properties > column headers > add column i typed in the text i did this for 3 columns then clicked apply and then ok and i had to columns . Is that how im suppous to add columns?

Listview Add Item
how do i add an item to the second, third, fourth, fifth, etc column of a listview?

Add Item To Listview
when i add data to listview, why then new data goes to the top line, not the bottom line? thanks

Add Item To Listview
when i add data to listview, why then new data goes to the top line, not the bottom line? thanks

Add Item In Listview
How do I add a item in listview with data in different columns??

please!!

Item In A Listview
I want to get an specific item in a listview. I mean: I have several information displayed on a listview. If the User click on the listview on item X, i want to get the value of column Y.

Set A ListView Item By Key?
VB Code:
lvItem.SubItems(1) = "Text"


The above sets a ListView list sub item by index, but can I code the above to work by the .Key property somehow?


VB Code:
lvItem.SubItems("KeyName") = "Text"


Doesn't work...

I just realised that the 1st version is a pain if I reorder the columns in the listview. So, I'd like to access it by key, if I can, but it doesn't seem to provide that interface...

1st Item In ListView
Can anybody tell me the code to select the 1st item in a listview control?

I've tried the GetFirstVisible method, but it doesnt always select the top most item...

cheers.

Copyright © 2005-08 www.BigResource.com, All rights reserved