getStringWidth
function getStringWidth(text: string): integer;
Returns the width (in pixels) for showing the 'text' on display in the current font.
var text: string;
width: integer;
begin
text := 'Text to display';
width := getStringWidth(text);
drawText(text, (getWidth - width)/2, 0);
repaint;
delay(1000);
end.
See also: getStringHeight, getWidth, getHeight, repaint