CListCtrl report view invisible columns - Programmer

This is a discussion on CListCtrl report view invisible columns - Programmer ; Hi gurus! Is there an elegant and rather easy way of doing the following: My list (report view) has a number of columns. Each column represents a different information about an item. Sometimes, all the items lack of some information ...

+ Reply to Thread
Results 1 to 3 of 3

Thread: CListCtrl report view invisible columns

  1. CListCtrl report view invisible columns

    Hi gurus!

    Is there an elegant and rather easy way of doing the following:

    My list (report view) has a number of columns. Each column represents
    a different information about an item. Sometimes, all the items lack
    of some information - and therefore, one of the columns will stay
    empty. In these cases, I don't want to display the column - with no
    information in it.
    For example, if my columns are "Name", "Hair color", "IQ"
    Then I would like to see the following:

    Name | Hair | IQ |
    | Color| |
    ________________________| (all information is available)
    MFC guru 1 | grey | 200 |
    MFC guru 2 | black| 203 |


    And

    Name | Hair |
    | Color |
    ______________| (IQ information is unavailable, and I wonder why )
    Jenya | blond |
    Jenya`| blond |
    Jenya1| blond |


    I thought of some function which should've existed, but I couldn't
    find it.. Something like "SetInvisible(columnNum)"... but nope..
    The way I'm planning to do it by now - is to create the columns each
    time I see the proper information exists...

    So, dear gurus, what can you suggest?
    Thanks in advance.

    Jenya.

  2. Re: CListCtrl report view invisible columns

    "Jenya" wrote in message
    news:8d7be22c.0401140352.529ce09e@posting.google.c om...
    > Hi gurus!
    >
    > Is there an elegant and rather easy way of doing the following:
    >
    > My list (report view) has a number of columns. Each column represents
    > a different information about an item. Sometimes, all the items lack
    > of some information - and therefore, one of the columns will stay
    > empty. In these cases, I don't want to display the column - with no
    > information in it.


    Jenya,

    The elegant and easy way to do this is not to do it at all. Having columns
    appear and disappear (apparently at random) is just going to create a lot of
    bug reports for you when your users notice it. OTOH, an empty field conveys
    information in it's own right.

    If the empty cell offends you, put "N/A" in it.

    --
    Terry R.
    My return address is munged



  3. Re: CListCtrl report view invisible columns

    Try setting column width to zero. ????.

    "Jenya"
    news:8d7be22c.0401140352.529ce09e@posting.google.c om...
    > Hi gurus!
    >
    > Is there an elegant and rather easy way of doing the following:
    >
    > My list (report view) has a number of columns. Each column represents
    > a different information about an item. Sometimes, all the items lack
    > of some information - and therefore, one of the columns will stay
    > empty. In these cases, I don't want to display the column - with no
    > information in it.
    > For example, if my columns are "Name", "Hair color", "IQ"
    > Then I would like to see the following:
    >
    > Name | Hair | IQ |
    > | Color| |
    > ________________________| (all information is available)
    > MFC guru 1 | grey | 200 |
    > MFC guru 2 | black| 203 |
    >
    >
    > And
    >
    > Name | Hair |
    > | Color |
    > ______________| (IQ information is unavailable, and I wonder why )
    > Jenya | blond |
    > Jenya`| blond |
    > Jenya1| blond |
    >
    >
    > I thought of some function which should've existed, but I couldn't
    > find it.. Something like "SetInvisible(columnNum)"... but nope..
    > The way I'm planning to do it by now - is to create the columns each
    > time I see the proper information exists...
    >
    > So, dear gurus, what can you suggest?
    > Thanks in advance.
    >
    > Jenya.




+ Reply to Thread