change the backgroundcolor and font of the cell in a propertygrid

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • matthijsdezwart@gmail.com

    change the backgroundcolor and font of the cell in a propertygrid

    Hi,

    I was wondering if someone can help me out with a propertygrid
    problem.
    Someone else made a program where I insert my script. This script has
    some propertíes, which are specified like:

    public string _firstProp;
    public int _secondProp;

    _firstProp = "Default Value";
    _secondProp = 0;

    public string firstProp
    {
    get {return _firstProp;}
    set {_firstProp=val ue;}
    }

    public int secondProp
    {
    get{return _secondProp;}
    set{_secondProp =value;}
    }

    therse parameters are used in a propertygrid. I would like to be able
    to change the background of the cell and the font of the cell, if (for
    instance) _secondProp = 1 instead of 0.
    Is that possible?
    Kind regards,

    Matthijs
  • VisualHint

    #2
    Re: change the backgroundcolor and font of the cell in a propertygrid

    Hello Matthijs,

    No, this is not possible in the Microsoft PropertyGrid. However, if a
    3rd party component is an option, this kind of flexibility is
    available in Smart PropertyGrid.Ne t.

    Best regards,

    Nicolas Cadilhac @ VisualHint (http://www.visualhint.com)
    Home of Smart PropertyGrid for .Net and MFC (http://www.visualhint.com/
    index.php/propertygrid)
    Microsoft PropertyGrid Resource List - http://www.propertygridresourcelist.com
    Home of Smart FieldPackEditor .Net / DateTimePicker replacement (http://
    www.visualhint.com/index.php/fieldpackeditor)



    On Oct 14, 11:29 am, matthijsdezw... @gmail.com wrote:
    Hi,
    >
    I was wondering if someone can help me out with apropertygrid
    problem.
    Someone else made a program where I insert my script. This script has
    some propertíes, which are specified like:
    >
    public string _firstProp;
    public int _secondProp;
    >
    _firstProp = "Default Value";
    _secondProp = 0;
    >
    public string firstProp
    {
       get {return _firstProp;}
       set {_firstProp=val ue;}
    >
    }
    >
    public int secondProp
    {
       get{return _secondProp;}
       set{_secondProp =value;}
    >
    }
    >
    therse parameters are used in apropertygrid. I would like to be able
    to change the background of the cell and the font of the cell, if (for
    instance) _secondProp = 1 instead of 0.
    Is that possible?
    Kind regards,
    >
    Matthijs

    Comment

    • matthijsdezwart@gmail.com

      #3
      Re: change the backgroundcolor and font of the cell in a propertygrid

      Hi Nicolas,

      thanks for the info. I'll look into it.
      regards,

      Matthijs
      Hello Matthijs,
      >
      No, this is not possible in the Microsoft PropertyGrid. However, if a
      3rd party component is an option, this kind of flexibility is
      available in Smart PropertyGrid.Ne t.
      >
      Best regards,
      >
      Nicolas Cadilhac @ VisualHint (http://www.visualhint.com)
      Home of Smart PropertyGrid for .Net and MFC (http://www.visualhint.com/
      index.php/propertygrid)
      Microsoft PropertyGrid Resource List -http://www.propertygri dresourcelist.. com
      Home of Smart FieldPackEditor .Net / DateTimePicker replacement (http://www.visualhint.com/index.php/fieldpackeditor)
      >
      On Oct 14, 11:29 am, matthijsdezw... @gmail.com wrote:
      >
      >
      >
      Hi,
      >
      I was wondering if someone can help me out with apropertygrid
      problem.
      Someone else made a program where I insert my script. This script has
      some propertíes, which are specified like:
      >
      public string _firstProp;
      public int _secondProp;
      >
      _firstProp = "Default Value";
      _secondProp = 0;
      >
      public string firstProp
      {
         get {return _firstProp;}
         set {_firstProp=val ue;}
      >
      }
      >
      public int secondProp
      {
         get{return _secondProp;}
         set{_secondProp =value;}
      >
      }
      >
      therse parameters are used in apropertygrid. I would like to be able
      tochangethe background of the cell and thefontof the cell, if (for
      instance) _secondProp = 1 instead of 0.
      Is that possible?
      Kind regards,
      >
      Matthijs- Tekst uit oorspronkelijk bericht niet weergeven -
      >
      - Tekst uit oorspronkelijk bericht weergeven -

      Comment

      Working...