I have a FoxPro 9 application that has different controls on several
tabs. On one tab, I have a Treeview control. I want the control to
resize itself when the form is resized. When you are on the tab with
the Treeview control and resize the form, the treeview control resizes
itself just fine.

However, if you go to another tab and then come back, the treeview
control goes back to its original size. Actually, it starts off at
the correct size, then when all the controls on the tab are finished
loading, it resizes itself back to the original size. I have tried
tracing through the code, and there is nothing in the code which is
making it go back to the original size.

Any ideas how to correct this?

Regards,
Kevin Clark
Seton Home Study School

Re: Problem with resizing control by Fred

Fred
Tue Apr 08 20:16:29 CDT 2008

Well, there must be some code changing it, or maybe you're adding the
Treeview to the page when it's displayed?

--
Fred
Microsoft Visual FoxPro MVP


<KevClark64@hotmail.com> wrote in message
news:0e47b7f6-8309-4610-93ac-0b131cdf10f7@d45g2000hsc.googlegroups.com...
>I have a FoxPro 9 application that has different controls on several
> tabs. On one tab, I have a Treeview control. I want the control to
> resize itself when the form is resized. When you are on the tab with
> the Treeview control and resize the form, the treeview control resizes
> itself just fine.
>
> However, if you go to another tab and then come back, the treeview
> control goes back to its original size. Actually, it starts off at
> the correct size, then when all the controls on the tab are finished
> loading, it resizes itself back to the original size. I have tried
> tracing through the code, and there is nothing in the code which is
> making it go back to the original size.
>
> Any ideas how to correct this?
>
> Regards,
> Kevin Clark
> Seton Home Study School



Re: Problem with resizing control by KevClark64

KevClark64
Wed Apr 09 13:59:37 CDT 2008

You're right, there must be something in the code, but I sure can't
find it. I searched the code for a statement changing the Height of
the control (other than the one in the resize event) and I stepped
through the code. No luck.

I was able to solve the problem, though, by putting a statement in the
resize event of the control that checks to make sure it is the right
height. If it isn't, it changes it to the right height.

Regards,
Kevin Clark

Re: Problem with resizing control by KevClark64

KevClark64
Wed Apr 09 15:25:10 CDT 2008

I finally did stumble on the problem. The Anchor property was set to
not permit resizing, which was automatically changing the TreeView
control back to its original size.

Regards,
Kevin Clark


Re: Problem with resizing control by Fred

Fred
Wed Apr 09 20:18:53 CDT 2008

See, I knew there had to be something. ;) Glad you've got it under control
now.

--
Fred
Microsoft Visual FoxPro MVP


<KevClark64@hotmail.com> wrote in message
news:7673fe7b-74b0-4f73-a458-be6d988b82a6@z38g2000hsc.googlegroups.com...
>I finally did stumble on the problem. The Anchor property was set to
> not permit resizing, which was automatically changing the TreeView
> control back to its original size.
>
> Regards,
> Kevin Clark
>