Results 1 to 5 of 5

Thread: [RESOLVED] Listview Control 5.0

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Jan 2006
    Posts
    23

    Resolved [RESOLVED] Listview Control 5.0

    How do you add items to the 5.0 version of listview control. I know how to do that with listview 6.0 but the parameters used in 6.0 don't exist in the older version. I am using 5.0 version because you can add the Xp look to it. So if you know a way to add the XP look to the 6.0 version that would be equally nice =D
    Thanks in advance
    Last edited by Hack; Feb 10th, 2006 at 07:08 AM. Reason: Added [RESOLVED] to thread title and green "resolved" checkmark

  2. #2
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,709

    Re: Listview Control 5.0

    I just added a 5.0 listview and its the same parameters.
    VB Code:
    1. ListView1.ListItems.Add , , "Test"
    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6

  3. #3

    Thread Starter
    Junior Member
    Join Date
    Jan 2006
    Posts
    23

    Re: Listview Control 5.0

    Thats good but I want it to add the item to a certain column in 6.0 that would looks like:
    ListView1.ListItems(1).ListSubItems.Add , , "text1"
    but 5.0 doesn't have those parameters. >_<
    Thanks for the help though.

  4. #4
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,709

    Re: Listview Control 5.0

    VB Code:
    1. Option Explicit
    2.  
    3. Private Sub Form_Load()
    4.     Dim itm As ListItem
    5.     Set itm = ListView1.ListItems.Add(, , "Test")
    6.     itm.SubItems(1) = "Sub Item"
    7.     Set itm = Nothing
    8. End Sub
    9.  
    10. 'Result:
    11. 'Test  |  Sub Item
    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6

  5. #5

    Thread Starter
    Junior Member
    Join Date
    Jan 2006
    Posts
    23

    Re: Listview Control 5.0

    Oh now it works thanks man appreciate it

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width