Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Resize problem

Status
Not open for further replies.

Mats

Technical User
Feb 18, 2000
83
EU
Hello,

I can't figure this one out. I'm trying toposition a textbox (txtSum) on the forms resize event. I use the code below, but get an error saying that the control is too large for the area. When I step through the code everything looks o.k.

txtSum.Top = Me.InsideHeight - txtSum.Height - 100

Thanks for any help,
Mats
 
Try using Me.section(0).Height instead of Me.InsideHeight.

Dunno what difference it will make but give it a go and have a look. It sorted out some weird problems I was having with forms and resizing.
 
Nope, doesn't seem to work. The property does not seem to change when the form is resized.

Mats
 
Your quite right, my suggestion was a load of poo.

Your original code works fine for me as long as you only make the form smaller than it's original size.

Try this - it works for me:

me.section(0).height=me.insideheight
txtSum.Top = Me.InsideHeight - txtSum.Height - 100
 
Thanks for the help!

This was one strange 'feature'... As long as the form is bigger in design mode than when it's resized this works just fine.

Setting me.section(0).height=me.insideheight works otherwise, but when the form is started it generates an error.

Thanks again,
Mats
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top