I have four container controls on my window and when the window resizes I want to be able to move the top left and adjust the height of each control, but it is messing up!
The top container controls top left is anchored and the bottom container controls bottom right is anchored bottom right.
The others are anchored top, left.
This is the window resized event:
[code]dim t as single
dim b as single
const gap as single = 20
dim wh, h as single
t = C1.top // Top of top control.
b = top + height // Bottom of the ‘window’
wh = (b - t + 1) // Height of all controls.
h = (wh / 4) - (4 * gap) // Height of each control.
C1.Height = h
t = t + h + gap
C2.top = t
C2.Height = h
t = t + h + gap
C3.Top = t
C3.Height = h
t = t + h + gap
C4.Top = t
C4.Height = h[/code]
This behaves very oddly in the resized event… or resizing or paint…
What am I doing wrong?
Is it that I must do something with the resize events of each control as well?