Author Topic: Trying to create a dynamic form  (Read 4173 times)


  • Hero Member
  • *****
  • Posts: 6206
Re: Trying to create a dynamic form
« Reply #45 on: February 29, 2024, 11:23:35 am »
I presume you may have nailed it. The problem could be this screen update thing. How can I turn it on and off ? The thing is,
the resize from 10 x 35 to 60 x 60 is from 350 chars to 3600 chars, so probably this is the cause of the slowdown.
I see that assigning TRichMemo.Text does do a TRichMemo.Lines.BeginUpdate and EndUpdate.
So this should already be done.

But... still... assigning something to TRichMemo.Text is costly.
It might be better that you first create a string with what you want to show.
Then assign it to TRichMemo.Text.
And then apply coloring.
That would speed things up considerably.

And I still wonder if you shouldn't just do this for your whole ConsoleColorBuffer.
Doing it for each "view" when resizing is very very inefficient.
You could do it in TRichMemo.Paint but that isn't exposed.

BTW. If it's just for coloring and font-changes, other than 1 font per memo, then TSynEdit might be a better choice.


TinyPortal © 2005-2018