tags:

views:

290

answers:

1

I'm having a problem with a component I use.Its aligned to bottom ,and ,when form is maximized,the control is placed at the correct position,but when I attempt to minimize the form,the control stays at the position where it is.

I tried using a timer that always sets the align to bottom,but I'm sure a timer is the worst solution to my issue.

Please suggest a way to set the align to Bottom when the form is restored from maximize.(maximize->restore only).

My current idea is to check if form is maximized at FormResize event,but that won't work,because I need to do it when its restored,not maximized.

+9  A: 

You can check if a form is maximised by using

Self.WindowState = wsMaximized

Other states are

  • wsNormal
  • wsMinimized
  • wsMaximized

Depending on what you are doing, you could also place the control on a panel and align the panel to the bottom of the form, if you turn the borders off and use the parent colour, you cant see the panel, that way it will stay at the bottom of the form without additional code.

Re0sless