Avoid escape characters when setting string property

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • bokisa
    New Member
    • May 2010
    • 6

    #1

    Avoid escape characters when setting string property

    Hi,

    I am having a problem with string property in my custom control.

    If I use \n \r... special chars in this property, they are replaced with escape quotes. Example:

    if I set next value:

    Code:
    row0\nrow1\nrow2
    In designer it will be automatically replaced with:

    Code:
    row0\\nrow1\\nrow2
    As you may see, escape chars are added.

    This may be done and by using button control and Text property.

    My question is how to disable adding escape quotes in this my property. Should I use some attribute parameter, or something else?

    Thank you
  • Plater
    Recognized Expert Expert
    • Apr 2007
    • 7872

    #2
    Stop setting it in the designer itself, go open up the designer file and make the changes there

    Comment

    • bokisa
      New Member
      • May 2010
      • 6

      #3
      Hi,

      Problem is that I made custom control for other users. Maybe there is a better solution.

      Best regards

      Comment

      • Plater
        Recognized Expert Expert
        • Apr 2007
        • 7872

        #4
        Well all you need to really do is the property in code and not use the gui. The gui will convert.

        Comment

        • bokisa
          New Member
          • May 2010
          • 6

          #5
          I was think that there is some attribute to control this.

          Comment

          Working...