Apart from that - just in terms of discussion about structuring a script that supports dynamic window sizing ... I would tend to recommend this approach:

Instead of creating and re-creating all the "extra" controls everytime the form gets resized - might want to pre-create them ahead of time, then selectively ENABLE and DISABLE as required. I also think this apporach is alot more friendly in terms of managing the life-times (scope) of the objects. It would probably be "faster" as well.

Heres an example (it works-around the REFRESH problem by creating the controls as children of the form). Give it a spin and let me know your thoughts. Only caveat would be is if you had OPTIONBUTTONS in the extra bit ... but the TABGROUP property - when implemented, would take care of that.

code:
Break On

$Form = CreateObject("Kixtart.Form")
$Form.FontSize = 10
$Form.Resizable = 1
$Form.Size = 300,200

$TextBox1 = $Form.TextBox
$TextBox1.Text = "<name>"
$TextBox1.Center
$TextBox1.Top = 20

$TextBox2 = $Form.TextBox
$TextBox2.Text = "<address>"
$TextBox2.Center
$TextBox2.Top = $TextBox1.Bottom + 20

$Button = $Form.Button
$Button.Text = "Extra >>"
$Button.Center
$Button.Top = 125
$Button.OnClick = "Button_Click()"

$Frame = $Form.Frame
$Frame.Text = "Extra:"
$Frame.Size = 270,130
$Frame.Center
$Frame.Top = $Form.ClientHeight + 10

$TextBox3 = $Form.TextBox
$TextBox3.Text = "Data"
$TextBox3.Left = $Frame.Left + 40
$TextBox3.Top = $Frame.Top + 30
$TextBox3.Enabled = 0

$TextBox4 = $Form.TextBox
$TextBox4.Text = "Data"
$TextBox4.Left = $Frame.Left + 40
$TextBox4.Top = $TextBox3.Top + 50
$TextBox4.Enabled = 0

Function Button_Click()

If $Form.ClientHeight = 173
$TextBox3.Enabled = 1
$TextBox4.Enabled = 1
$Form.ClientHeight = $Frame.Bottom + 20
$Button.Text = "<< Extra"
Else
$Form.ClientHeight = 173
$Button.Text = "Extra >>"
$TextBox3.Enabled = 0
$TextBox4.Enabled = 0
EndIf

EndFunction

$TextBox1.SetFocus

$Form.Center
$Form.Show

While $Form.Visible
$=Execute($Form.DoEvents)
Loop

Exit 1



[ 12. September 2002, 15:31: Message edited by: Shawn ]