CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Feb 2003
    Posts
    4

    Question Autosizing listview columns

    I use a listview i detailview - ie. I have some columns...

    how do I code the same functionality that I get when I doubleclick between two columns to make the columns autosize ?

    I VB6 there was a function called textwidth (or something like that). I .NET there is a function in the graphics object called drawstring that should be able to do the same - but I can't seem to make it work!!!

    Anyone got some juicy examples ??

    Thank You

  2. #2
    Join Date
    Jun 2001
    Location
    MO, USA
    Posts
    2,868
    Take a look at System.Drawing.Graphics MeasureString method.

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

Featured