Menu

#5 Improvements for appearance of disabled properties

closed
None
5
2006-08-23
2006-08-17
Anonymous
No

I noticed that you can use SetPropertyColour () to set
the background color of a property, but what about its
text color? I swearched through the documentation and
code to make sure I just wasn't seeing it. So if there
is no way to do this currently, could you add this
feature?

The idea behind this is I want to disable a property if
some condition isn't met. But just disabling it isn't
very visual to the user, as it still looks active until
they try to edit the value. So I want to gray out the
text so it looks disabled. And I have to do this per
property, not change the text color of all the
properties (which I know you can do).

Discussion

  • Jaakko Salli

    Jaakko Salli - 2006-08-18

    Logged In: YES
    user_id=1193883

    Disabling should grey the text. What's your OS, wxWidgets
    version, compiler, theme (if non-default)?

    And yes, I think SetPropertyTextColour could be useful as
    well, and will most likely add it during the next
    development cycle (ie. you probably won't see it in 1.2.x
    releases).

     
  • Jaakko Salli

    Jaakko Salli - 2006-08-18
    • assigned_to: nobody --> jmsalli
     
  • crenix

    crenix - 2006-08-18

    Logged In: YES
    user_id=1212298

    Windows XP Pro SP2, wxWidgets 2.6.3, MS VC++ 8 (2005), theme
    is windows standard (the gray default one similar to windows
    2k).

    I know what you're talking about graying out the property if
    you disable it (I compiled the demo for wxpropgrid). But, it
    only grays out the value you change, I also want to gray out
    the text for the property name.

    The graying out of the value does not work in my program,
    but that must be from the non-standard color theme I apply
    to the property grid.

     
  • Jaakko Salli

    Jaakko Salli - 2006-08-18

    Logged In: YES
    user_id=1193883

    Seeing that atleast .NET 2.0 property grid does it, I'm now
    thinking it would indeed be better if both label and value
    were greyed. Also, ability to change disabled text colour
    should be added.

    I'll see later today how to add these in
    backwards-compatible manner.

     
  • Jaakko Salli

    Jaakko Salli - 2006-08-18

    Logged In: YES
    user_id=1193883

    Ok, development snapshot has been updated. See:

    http://wxpropgrid.sourceforge.net/cgi-bin/index?page=download#snapshots

    I have added extra style wxPG_EX_GREY_LABEL_WHEN_DISABLED
    which, when used, does what it says. Also, you can change
    the disabled property text colour using
    wxPropertyGrid::SetCellDisabledTextColour.

     
  • crenix

    crenix - 2006-08-18

    Logged In: YES
    user_id=1212298

    You rock. I appreciate your hard work and promptness. I'll
    let you know if I see anything else that needs
    fixing/changing/adding.

     
  • Jaakko Salli

    Jaakko Salli - 2006-08-19
    • status: open --> closed
     
  • Jaakko Salli

    Jaakko Salli - 2006-08-23
    • summary: Being able to change property text color. --> Improvements for appearance of disabled properties
     

Log in to post a comment.