CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3

Thread: Subitems

  1. #1
    Join Date
    May 1999
    Location
    South Africa
    Posts
    19

    Subitems

    Is it possible to add checkboxes to the subitems of Listviews or FlexGrids ?

    If so how ?


  2. #2
    Join Date
    Nov 1999
    Location
    Trinidad, West Indies
    Posts
    10

    Re: Subitems

    The closest solution I can think of is to use pictures in the cells of your FlexGrid control.

    Store two pics in your application -
    1. An empty check box
    2. A checked box
    - and interchange between them when necessary. You will have to size your cells to fit the pics.

    Change from one pic to the other using the control's click event. The MouseRow/MouseCol properties will identify the cell that was clicked.

    This technique works well with treeview controls.
    Use TreeViewControlName.SelectedItem.Index to identify the location for the new image.

    I've never tried it with listview controls (Sorry).

    I hope I was able to help.
    jusclev


  3. #3
    Join Date
    May 1999
    Location
    Omika, Japan
    Posts
    729

    Re: Subitems

    Yes it is possible to have check boxes in Listview (if the IE version is > 4.0), but it is only for First item.
    It is also possible to have pictures in sub items, so using a picture that looks like a check box, may be you can simulate the effect. This is not all that easy, and i had seen the C- code (WIn32 sample). I dont off-hand remember if it involes subclassing or just windows messages!.
    you need to port it. I will tell you if you are interested in taking that path, or check MSDN

    With MS flexgrid, see the other reply. That is the best and easy method.

    RK

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