skafy Posted June 22, 2016 Posted June 22, 2016 Hi, how can i make memo with autosize when text wrap. I would like memo with 1 line and than when wordwrap happens i would like to increase memo height for 1 line. I've tried code from another post seen below, but doesn't seems to be accurate: function TPaginaPrincipal.TextWidth(s: TUniLabel): Integer; var c: TBitmap; f: TFont; begin { uma forma de calcular o tamanho de um texto na janela se o canvas não atualiza via ajax } c := TBitmap.Create; f := TFont.Create; Result := 8 * Length(s.Caption); f.Height := s.Font.Height; f.Size := s.Font.Size; f.Name := s.Font.Name; f.Style := s.Font.Style; try c.Canvas.Font.Assign(f); Result := c.Canvas.TextWidth(s.Caption); finally c.Free; end; end; How can I accomplish this? Quote
Sherzod Posted June 24, 2016 Posted June 24, 2016 Hi, In ExtJS there is a grow config option, true if this field should automatically grow and shrink to its content, but I think it also depends on the container too Need to analyze Best regards. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.