none
fastColoredTextBox error RRS feed

  • Question

  • i got an error with fastColoredTextBox:

    this.fastColoredTextBox1.AutoCompleteBracketsList = new char[] {
            '(',
            ')',
            '{',
            '}',
            '[',
            ']',
            '\"',
            '\"',
            '\'',
            '\''};
                this.fastColoredTextBox1.AutoScrollMinSize = new System.Drawing.Size(27, 14);
                this.fastColoredTextBox1.BackBrush = null;
                this.fastColoredTextBox1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(25)))), ((int)(((byte)(25)))));
                this.fastColoredTextBox1.CharHeight = 14;
                this.fastColoredTextBox1.CharWidth = 8;
                this.fastColoredTextBox1.Cursor = System.Windows.Forms.Cursors.IBeam;
                this.fastColoredTextBox1.DisabledColor = System.Drawing.Color.FromArgb(((int)(((byte)(100)))), ((int)(((byte)(180)))), ((int)(((byte)(180)))), ((int)(((byte)(180)))));
                this.fastColoredTextBox1.IndentBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(25)))), ((int)(((byte)(25)))));
                this.fastColoredTextBox1.IsReplaceMode = false;
                this.fastColoredTextBox1.LineNumberColor = System.Drawing.Color.Gray;
                this.fastColoredTextBox1.Location = new System.Drawing.Point(12, 2);
                this.fastColoredTextBox1.Name = "fastColoredTextBox1";
                this.fastColoredTextBox1.Paddings = new System.Windows.Forms.Padding(0);
                this.fastColoredTextBox1.SelectionColor = System.Drawing.Color.FromArgb(((int)(((byte)(60)))), ((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(255)))));
                this.fastColoredTextBox1.ServiceColors = ((FastColoredTextBoxNS.ServiceColors)(resources.GetObject("fastColoredTextBox1.ServiceColors")));
                this.fastColoredTextBox1.ServiceLinesColor = System.Drawing.Color.White;
                this.fastColoredTextBox1.Size = new System.Drawing.Size(730, 244);
                this.fastColoredTextBox1.TabIndex = 21;
                this.fastColoredTextBox1.TabStop = false;
                this.fastColoredTextBox1.Zoom = 100;
                this.fastColoredTextBox1.TextChanged += new System.EventHandler<FastColoredTextBoxNS.TextChangedEventArgs>(this.fastColoredTextBox1_TextChanged);
                // 

    Monday, April 29, 2019 1:08 PM

All replies

  • Don't know about FastColoredTextBox, but it seems to me that you're running into a circle by assigning the value of the property ServiceColors of your fastColoredTextBox1 object to itself. What do you want to achieve by that?

    wizend

    Monday, April 29, 2019 1:49 PM
  • There is no such thing as a FastColoredTextBox in Winforms. If this is a third party component then you'll need to post your question in their forums. Given the line it appears there is a color with the ServiceColors property implementation. Of course you didn't post the stack trace so we have no idea what that might be. If this is your own control then please post the code for that property.

    Michael Taylor http://www.michaeltaylorp3.net

    Monday, April 29, 2019 1:57 PM
    Moderator
  • Hi

    Thank for posting here.

    Since this thread is related to fastcoloredtextbox, it is a third-party product, you could ask questions in the following link.

    https://github.com/PavelTorgashov/FastColoredTextBox

    The Visual C# forum discusses and asks questions about the C# programming language, IDE, libraries, samples, and tools.

    Best regards,

    Jack


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Tuesday, April 30, 2019 4:21 AM
    Moderator
  • Greetings Ahron.

    If FastColoredTextBox is a class you have control over, check that the property ServiceColors is not returning itself. This sort of error can happen when, for example, there is a mixup between upper and lower case letters.

    FastColoredTextBoxNS serviceColors; // Note the lower case  's' in serviceColors.
    
    // The property get and set should use a lower case 's' to match the backing variable, but if it doesn't...
    public FastColoredTextBoxNS ServiceColors{ get {return ServiceColors;} set{ServiceColors = value;}}
    
    //... the property will call itself in an infinite loop and exhaust the stack.


    • Edited by Ante Meridian Tuesday, April 30, 2019 4:55 AM specified get and set
    Tuesday, April 30, 2019 4:53 AM