How can I make my form resize more smoothly?

后端 未结 5 1805
爱一瞬间的悲伤
爱一瞬间的悲伤 2021-01-31 18:57

When resizing a form with many controls, the form looks bad because of flickering. What are some tips to have a smoother form resizing?

5条回答
  •  眼角桃花
    2021-01-31 19:37

    I avoid flicker by aligning no more than 1 non-alClient component per parent, always paired with a alClient (e.g. a TPanel) to contain all other components. Group them in panels without borders.

    Say you want to allign three things: alLeft, alTop and alClient for the main view. Dont do this: Form alTop alLeft alClient // your main view

    But instead embed these as follows: Form alTop alClient // panel to avoid flicker alLeft alClient // your main view

    Same story for embedding several alTop elements.

提交回复
热议问题