How to add checkboxes in subitem of listview?-VBForums
Results 1 to 8 of 8

Thread: How to add checkboxes in subitem of listview?

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Feb 2007
    Posts
    177

    How to add checkboxes in subitem of listview?

    Hello everybody

    Does exist some way how to do it.

    Thanks

  2. #2
    Super Moderator Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,335

    Re: How to add checkboxes in subitem of listview?

    Not with a standard VB ListView.

    The checkbox applies to the entire row.
    Please use [Code]your code goes in here[/Code] tags when posting code.
    When you have received an answer to your question, please mark it as resolved using the Thread Tools menu.
    Before posting your question, did you look here?
    Got a question on Linux? Visit our Linux sister site.
    I dont answer coding questions via PM or EMail. Please post a thread in the appropriate forum section.

    Creating A Wizard In VB.NET
    Paging A Recordset
    What is wrong with using On Error Resume Next
    Good Article: Language Enhancements In Visual Basic 2010
    Upgrading VB6 Code To VB.NET
    Microsoft MVP 2005/2006/2007/2008/2009/2010/2011/2012/Defrocked

  3. #3
    Super Moderator RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,488

    Re: How to add checkboxes in subitem of listview?

    Yes you can with a ListView, but you can only have one checkbox per row still. Add the checkbox to the default first column. Then reorder the columns so the first one is where you want your"subitem" column to be positioned with a checkbox.
    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!
    Star Wars Gangsta Rap 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, Corsair H100i v2 water cooler, Geforce GTX1060, Samsung M.2 500 GB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2010, VS 2010

  4. #4

    Thread Starter
    Addicted Member
    Join Date
    Feb 2007
    Posts
    177

    Re: How to add checkboxes in subitem of listview?

    Hello

    Sorry, but I need more than one columns with checkboxes. But these checkboxes can be uneditable as icons. I don't need to click on them, they will have only inform purpose.

    How can I put checked or unchecked checkbox in subitems. I want to use listview with report style.

    Thanks

  5. #5
    Super Moderator Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,335

    Re: How to add checkboxes in subitem of listview?

    Got out and find a third party listview control that supports that feature or create your own listview user control that supports that.

    The listview that comes with VB does not.
    Please use [Code]your code goes in here[/Code] tags when posting code.
    When you have received an answer to your question, please mark it as resolved using the Thread Tools menu.
    Before posting your question, did you look here?
    Got a question on Linux? Visit our Linux sister site.
    I dont answer coding questions via PM or EMail. Please post a thread in the appropriate forum section.

    Creating A Wizard In VB.NET
    Paging A Recordset
    What is wrong with using On Error Resume Next
    Good Article: Language Enhancements In Visual Basic 2010
    Upgrading VB6 Code To VB.NET
    Microsoft MVP 2005/2006/2007/2008/2009/2010/2011/2012/Defrocked

  6. #6
    Super Moderator Siddharth Rout's Avatar
    Join Date
    Feb 2005
    Location
    Mumbai, India
    Posts
    11,989

    Re: How to add checkboxes in subitem of listview?

    Hack and Rob are right that it is not possible in vb6 listview. But There is a possibility... Since you mentioned that "checkboxes can be uneditable as icons" so I can suggest a way around. ListView Control allows us to put images/icon for items & sub items, so simply use an image of a checked or unchecked checkbox as vb6 allows that.....
    A good exercise for the Heart is to bend down and help another up...
    Please Mark your Thread "Resolved", if the query is solved

    Microsoft MVP: 2011 - 2015 IMP Links : Acceptable Use Policy, FAQ
    MyGear:
    ACER R7 (Win 8.1+Office 2013+VS2013) || Sony VPCCB-45FN with a Win10+Office 2010. || Mac Book Pro (10.6.8) with Office 2011

  7. #7

    Thread Starter
    Addicted Member
    Join Date
    Feb 2007
    Posts
    177

    Re: How to add checkboxes in subitem of listview?

    Hello

    Can somebody get me some good example how to paint icons into subitems. I have no experiences with it. I want to use some system icons for checked and unchecked checkbox

    Thank

  8. #8
    Super Moderator Siddharth Rout's Avatar
    Join Date
    Feb 2005
    Location
    Mumbai, India
    Posts
    11,989

    Re: How to add checkboxes in subitem of listview?

    HA! NOW YOU ARE TALKING

    Hope this example helps...
    Attached Images Attached Images  
    Attached Files Attached Files
    A good exercise for the Heart is to bend down and help another up...
    Please Mark your Thread "Resolved", if the query is solved

    Microsoft MVP: 2011 - 2015 IMP Links : Acceptable Use Policy, FAQ
    MyGear:
    ACER R7 (Win 8.1+Office 2013+VS2013) || Sony VPCCB-45FN with a Win10+Office 2010. || Mac Book Pro (10.6.8) with Office 2011

Posting Permissions

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



Featured


Click Here to Expand Forum to Full Width

Survey posted by VBForums.