CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4
  1. #1
    Join Date
    Jan 2003
    Location
    Bangalore, INDIA
    Posts
    180

    Greying elements in listbox of checkbox style

    Hi Guys

    I am pursuing something which I dont even know is possible - just help me out please.

    I have a listbox control whose style is set to Checkbox.
    I am populating this listbox with about 10 elements, all set to true (checked)
    Out of these 10 elements a couple of them I dont want the user to uncheck them any time - and hence want these few items to appear 'grey' (as disabled).
    I did find a way out of doing this programatically that is checking these certain elements everytime they are unchecked - but the requirment here is that they should be 'greyed' instead.

    Thanks in advance

    Suhaib

  2. #2
    Join Date
    Sep 2004
    Location
    Iowa, USA
    Posts
    197

    Re: Greying elements in listbox of checkbox style

    If you don't want the user to change them, then why put them there? That may be bad GUI design.

  3. #3
    Join Date
    Jul 2000
    Location
    Milano, Italy
    Posts
    7,726

    Re: Greying elements in listbox of checkbox style

    Not agree with you, spuppett.
    Matter is:
    let them displayed among others
    to signal users they exists but tell
    users they cannot deal with them;
    like for example in a setup software,
    where you have to tell users some
    components must be installed. You
    see them in same list with those you
    can choose, but they are grayed

    It seems to me the control is not enough
    flexible to obtain the goal.

    Now, suhaib, you might try with a Treeview, which
    allow more customization over each node...
    ...at present time, using mainly Net 4.0, Vs 2010



    Special thanks to Lothar "the Great" Haensler, Chris Eastwood , dr_Michael, ClearCode, Iouri and
    all the other wonderful people who made and make Codeguru a great place.
    Come back soon, you Gurus.

  4. #4
    Join Date
    Jan 2003
    Location
    Bangalore, INDIA
    Posts
    180

    Re: Greying elements in listbox of checkbox style

    thank you guys

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