With StatusBar1.Panels[1] do begin Text := Edit1.Text; Canvas.Font.Size := StatusBar1.Font.Size; Width := Canvas.TextWidth(Text) + 10; end;