How to stretch a form only the width?

Asked

Viewed 38 times

2

I wanted to know how to stretch a form only right or left by preventing it from stretching down and up.

I checked the website http://docwiki.embarcadero.com/ who the forms have this property but does not answer me completely.

Valor           Significado
bsDialog      - Não redimensionável; sem menu minimizar / maximizar
bsSingle      - Não redimensionável; menu minimizar / maximizar
bsNone        - Não redimensionável; nenhuma linha de fronteira visível
bsSizeable    - Borda redimensionável padrão
bsToolWindow  - Como bsSingle, mas com uma legenda menor
bsSizeToolWin - Como bsSizeable com uma legenda menor

The option bsSizeable It even serves me more allows to stretch also up and down. if any know how to prevent the user from stretching up or down.

2 answers

2


You can use the Constraints.Maxwidth and Minwidth property to limit the dimensions.

  • Wow! It was really good. .

  • Yes, very good. With this property, you can implement the size control "before" the resize. Much better than dealing with Onresize, which occurs after resizing.

1

You can program a limiter in the event 'Onresize', think of something like:

  if Self.Height <> 400 then
    Self.Height := 400;

And this would suit any form style. In this example we are limiting any resizing up or down.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.