Hiding a row in CListCtrl - Programmer

This is a discussion on Hiding a row in CListCtrl - Programmer ; This has been asked on a few different posts, but I hope I can add a different spin to the question. I need to hide a row in CListCtrl rather than delete/insert a row. I realize hiding a row isn't ...

+ Reply to Thread
Results 1 to 5 of 5

Thread: Hiding a row in CListCtrl

  1. Hiding a row in CListCtrl

    This has been asked on a few different posts, but I hope I can add a
    different spin to the question.

    I need to hide a row in CListCtrl rather than delete/insert a row. I
    realize hiding a row isn't supported, but has anybody successfully
    simulated a hidden row, such as setting the height of a row to zero?

    Thanks,
    Jared

  2. Re: Hiding a row in CListCtrl

    wrote in message
    news:0bbe5295-efca-41c8-b454-0a3e55b18dcb@v67g2000hse.googlegroups.com...
    > This has been asked on a few different posts, but I hope I can add a
    > different spin to the question.
    >
    > I need to hide a row in CListCtrl rather than delete/insert a row. I
    > realize hiding a row isn't supported, but has anybody successfully
    > simulated a hidden row, such as setting the height of a row to zero?
    >


    Setting the height to 0 means each row has variable height, which means
    owner draw, which means complex. Instead, why not just delete/re-insert the
    row?

    -- David



  3. Re: Hiding a row in CListCtrl

    On 6 fév, 17:44, "David Ching" wrote:

    > > I need to hide a row in CListCtrl rather than delete/insert a row. I
    > > realize hiding a row isn't supported, but has anybody successfully
    > > simulated a hidden row, such as setting the height of a row to zero?

    >
    > Setting the height to 0 means each row has variable height, which means
    > owner draw, which means complex.


    An OD ListView has fixed row height.
    The row height can be changed with a MSFlexGrid.


  4. Re: Hiding a row in CListCtrl

    If you use a virtual list control you could flag hidden rows and just return
    the "next ones" skipping hidden ones when requested. It would take a little
    management code in the GetDispInfo() function and you'd have to be careful
    not to delete the wrong rows and stuff like that...

    Tom

    wrote in message
    news:0bbe5295-efca-41c8-b454-0a3e55b18dcb@v67g2000hse.googlegroups.com...
    > This has been asked on a few different posts, but I hope I can add a
    > different spin to the question.
    >
    > I need to hide a row in CListCtrl rather than delete/insert a row. I
    > realize hiding a row isn't supported, but has anybody successfully
    > simulated a hidden row, such as setting the height of a row to zero?
    >
    > Thanks,
    > Jared



  5. Re: Hiding a row in CListCtrl

    On Feb 6, 11:39*am, "Tom Serface" wrote:
    > If you use a virtual list control you could flag hidden rows and just return
    > the "next ones" skipping hidden ones when requested. *It would take a little
    > management code in the GetDispInfo() function and you'd have to be careful
    > not to delete the wrong rows and stuff like that...
    >
    > Tom
    >
    > wrote in message
    >
    > news:0bbe5295-efca-41c8-b454-0a3e55b18dcb@v67g2000hse.googlegroups.com...
    >
    >
    >
    > > This has been asked on a few different posts, but I hope I can add a
    > > different spin to the question.

    >
    > > I need to hide a row in CListCtrl rather than delete/insert a row. I
    > > realize hiding a row isn't supported, but has anybody successfully
    > > simulated a hidden row, such as setting the height of a row to zero?

    >
    > > Thanks,
    > >Jared- Hide quoted text -

    >
    > - Show quoted text -


    Thanks for the quick responses. I'll go with inserting/deleting a row,
    which seems to be the simplest option.

    Thanks,
    Jared

+ Reply to Thread