Flickerless coloured text
Posted on 1997-08-30
I want to display a text (Tlabel) and part of letters must have one colour (e.g. blue) and part must have
another colour (e.g. red).
Situation 1: all letters are red
Situation 2: the leftmost letter is blue, the rest is red
Situation 3: the 2 most left letters are blue, the rest is red
Situation 4: all letters are blue.
About 20 times every second a letter must change its colour, WITHOUT any flickering.
So far, I have tried the following with and without
I tried using 2 labels (the left label initially empty,
and then growing with 1 letter at the time, while the
second label initially is full, and looses 1 letter at
the time): FLICKERING occurs.
I tried using 1 label with a shape over it, colouring
the letters. The shape initially has a width of zero,
and grows the width of a letters every time:
I tried using 1 label with up to ten shapes colouring the
letters (initially all shapes have a width of zero,
and then grow in turn with 1,2,3,4,..or 10 letters width): FLICKERING occurs).
Due to the target of the program: I can't use Canvas.Paint
or at least I rather wouldn't want to do this, because
the label can be anywhere on the screen, and be moved
around at runtime.
I'm totally out of idears.