I have quite a nasty bug in a projet of mine where I use faTabStrip together with FastColoredTextbox to make a tabbed text editor. Every time I add a tab, and then switch back and forth, if I modify one of the two (e.g. even just, zooming in), the entire control crashes with an ArgumentException.
FastColoredTextBoxNS.FastColoredTextBox CurrentTB
{
get
{
if (faTabStrip1.SelectedItem != null && faTabStrip1.SelectedItem.Controls.Count > 0)
{
return (faTabStrip1.SelectedItem.Controls[0] as FastColoredTextBoxNS.FastColoredTextBox);
}
return null; // Nessun controllo presente o nessuna scheda selezionata
}
set
{
if (value != null)
{
FarsiLibrary.Win.FATabStripItem tabItem = value.Parent as FarsiLibrary.Win.FATabStripItem;
if (tabItem != null)
{
faTabStrip1.SelectedItem = tabItem;
value.Focus();
}
}
}
}
and here is the stack track:
Data: {System.Collections.ListDictionaryInternal}
StackTrace:
" in System.Drawing.Graphics.CheckErrorStatus(Int32 status)\r\n in System.Drawing.Graphics.DrawString(String s, Font font, Brush brush, RectangleF layoutRectangle, StringFormat format)\r\n in FastColoredTextBoxNS.FastColoredTextBox.OnPaint(PaintEventArgs e)\r\n in System.Windows.Forms.Control.PaintWithErrorHandling(PaintEventArgs e, Int16 layer)\r\n in System.Windows.Forms.Control.WmPaint(Message& m)\r\n in System.Windows.Forms.Control.WndProc(Message& m)\r\n in System.Windows.Forms.ScrollableControl.WndProc(Message& m)\r\n in System.Windows.Forms.ContainerControl.WndProc(Message& m)\r\n in System.Windows.Forms.UserControl.WndProc(Message& m)\r\n in FastColoredTextBoxNS.FastColoredTextBox.WndProc(Message& m)\r\n in System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)\r\n in System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)\r\n in System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)"
Hello,
I have quite a nasty bug in a projet of mine where I use faTabStrip together with FastColoredTextbox to make a tabbed text editor. Every time I add a tab, and then switch back and forth, if I modify one of the two (e.g. even just, zooming in), the entire control crashes with an ArgumentException.
Here's the code I have for when it changes tab:
and CurrentTB, taken directly from the demo:
and here is the stack track: Data: {System.Collections.ListDictionaryInternal} StackTrace: