> 
> You can create a function:
> void TrimStringToFitCell(char *string, int cell_width_pixels)
> {
> if (FntCharsWidth(string, StrLen(string)) > cell_width_pixels)
> {
> cell_width_pixels -= 6;
> do
> {
> string[StrLen(string) - 1] = 0;
> } while (FntCharsWidth(string, StrLen(string)) > cell_width_pixels);
> StrCat(string, "...");
> }
> }
> 

You should rather use FntCharsInWidth

Eric.

Reply via email to