Workaround: TRChart.AddTextLabel

Problem When using AddTextLabel new text labels cannot be created. The function always returns a zero value, indicating that no space is available for new labels.
Applies To Release 8.5
Solution This bug is due to a wrong initialization of the text label array. All text labels are set to Mode = tlBox and their Visible property is set to FALSE. Consequently, this leads to a full set of initialised but invisible text labels, pretending that there is no room for additional labels.

In order to solve this problem simply put in the following lines before using the text labels for the first time (a good place would be the OnCreate event of the parent form of the chart):

for i:=1 to MaxTxtLbl do
  RChart1.TextLabels[i].Mode := tlOff;
Hint: don't forget to include "SDL_sdlbase" to uses statement of the implementation section of your program.


Last Update: 2006-02-21