Results 1 to 4 of 4

Thread: Listview is not working

  1. #1

    Thread Starter
    Member
    Join Date
    May 2001
    Posts
    39

    Listview is not working

    I have used the Columns.Add method for add columns to a ListView control and the third parameter of this method is for setting horizontal alignment. The column is added to control but horizontal alignment is always right, also when i choose anohter aligment.
    Anyone knows the reason ?

  2. #2
    Lively Member
    Join Date
    Aug 2001
    Posts
    65
    The first column header item in the listview <Parent> is always left alignment, not sure why they wont let us change it but any column header subitem's i'm able to get them to be either left, center or right alignment.

  3. #3
    Lively Member
    Join Date
    Feb 2005
    Location
    Huddersfield, England
    Posts
    83

    Re: Listview is not working

    Is this still the case? Has anyone found a solution in the last couple of years

  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 is not working

    Create a "fake" column 1 with 0 width, hidden from the users view. Then your column 2 will appear
    to be the first column to the user and you can align it as you want. Populate your lv starting
    at column 2+
    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

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