CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 8 of 8
  1. #1
    Join Date
    Dec 2001
    Posts
    391

    Question ListView - Why do all ListView's have a Bottom Gap?

    Just trying to add a listview (in Report mode in VC++ using Win32 Apis) and noticed that no matter what i do there is always a bottom gap just after the last item in my ListView. How do i get rid of this gap? I have turned on Grids and so this gap is very distracting.

    Does anyone know?
    Attached Images Attached Images
    Last edited by quantass; August 2nd, 2005 at 04:17 PM.

  2. #2
    Join Date
    Feb 2002
    Posts
    3,788

    Re: ListView - Why do all ListView's have a Bottom Gap?

    Quote Originally Posted by quantass
    Just trying to add a listview (in Report mode in VC++ using Win32 Apis) and noticed that no matter what i do there is always a bottom gap just after the last item in my ListView. How do i get rid of this gap? I have turned on Grids and so this gap is very distracting.

    Does anyone know?
    I'm not sure what 'gap' you're reffering to...Can you post a sample project illustrating this?

  3. #3
    Join Date
    Feb 2000
    Location
    San Diego, CA
    Posts
    10,354

    Re: ListView - Why do all ListView's have a Bottom Gap?

    I don't understand. What gap ? Can you paste a small picture here ?
    Also, note, how is it that the it is there always ? I would have thought it should appear depending on what the height of the list control is..

  4. #4
    Join Date
    Dec 2001
    Posts
    391

    Re: ListView - Why do all ListView's have a Bottom Gap?

    Ok i've posted a picture for you all..Notice just afterthe last item "Hide on Click" there is a vertical gap...What is that? I didnt add a blank item to the bottom. My last is "Hide on Click". How do i turn that feature off?

  5. #5
    Join Date
    Feb 2000
    Location
    San Diego, CA
    Posts
    10,354

    Re: ListView - Why do all ListView's have a Bottom Gap?

    Well, as I said, did you try reducing the size of the list view in resource editor ?? That gap is not a bug.

  6. #6
    Join Date
    Dec 2001
    Posts
    391

    Re: ListView - Why do all ListView's have a Bottom Gap?

    Is there a way to rid this extra vertical spacing without having to reduce the height of the control. I would very much like to keep that size.

  7. #7
    Join Date
    Feb 2000
    Location
    San Diego, CA
    Posts
    10,354

    Re: ListView - Why do all ListView's have a Bottom Gap?

    No. Think about it. You specify a control to be of certain size. Now, you fill in say , just 3 items, what is the controls supposed to do with the extra space ? Stretch all items to exactly fit ?

    If that is what you want, you have to owner draw the control..

  8. #8
    Join Date
    Dec 2001
    Posts
    391

    Re: ListView - Why do all ListView's have a Bottom Gap?

    Thanks very much kirants...i think we are on different pages however, i was goofing around and just realized that it has to do with Inegral Heights that ListView uses. If i turn it off then the gap disappears which now makes sense.

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