Recent

Author Topic: TForm Height ClientHeight Top  (Read 1959 times)

mtanner

  • Sr. Member
  • ****
  • Posts: 287
TForm Height ClientHeight Top
« on: March 29, 2017, 08:00:43 am »
On writing some simple code to position forms in top/bottom halves of the screem I have noticed some problems.

I created a simple test application with a single screen that has a few buttons and labels on them. One button display in the labels the values of Height. ClientHeight, Screen.Height, Top.

First Height and ClientHeight seem to be synonymous. They give the same values. And a test button with an OnClick routines that does:
    H:=Height;
    ClientHeight:=H
does not change the height of the window.

Second, on maximising the window, the value of Top is -4, not zero as I would expect. And if I maximise the window, then  via another test button set Top:=0, the position of the window does not alter, though Top is then reads out 0.

 

TinyPortal © 2005-2018