How to remove all the markers in FCTB (Fast color Text Box) Quickly?

80 Views Asked by At

I am using below code to remove the markers on a tab , but it is taking a while to clear them for a long page.

Can somebody please suggest a faster way.

 int iRows = ft.CurrentTB.LineInfos.Count;
        for (int i = 1; i <= iRows; i++)
        {
            CurrentTB[i].BackgroundBrush = Brushes.Transparent;
            CurrentTB.Selection.Start = new Place(1, i);
            CurrentTB.DoSelectionVisible();
            CurrentTB.Invalidate();
       }
1

There are 1 best solutions below

0
On BEST ANSWER

The faster solution is as below:

int iRows = ft.CurrentTB.LineInfos.Count;
    for (int i = 1; i <= iRows; i++)
    {
        CurrentTB[i].BackgroundBrush = Brushes.Transparent;         
        CurrentTB.DoSelectionVisible();
   }
            CurrentTB.Select();
            CurrentTB.DoSelectionVisible();