Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Design time re-size
Message
 
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP
Network:
Windows 2003 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
01406083
Message ID:
01407862
Views:
90
Sorry, I don't have time to find the issue in your existing code. The way I'd approach this is to use the .Left and .Top from the left hand lst to determine the border margin you want to keep on the right and bottom as well. lnHorizontalMargin = lstFrom.Left. The space the buttons and their margin use is lnButtonSpace = lstTo.Left - ( lstFrom.Left - lstFrom.Width ), this space will remain the same after resizing assuming the objective is to maximize the space used by the listboxes. lnOriginalWidth = lstFrom.Width. lnOriginalSpaceUsed = lnHorizontalMargin *2 + lnButtonSpace + lsFrom.Width * 2. lstFrom.Width = ( this.Width - ( lnHorizontalMargin *2 + lnButtonSpace ) ) / 2. lstTo.Width = lstFrom.Width. And then just set the cmd.Left = cmd.Left + ( lstFrom.Width - lnOriginalWidth ) and lstTo.Left = this.Width - ( lnHorizontalMargin + lstTo.Width ). lstFrom.Height = this.Height - lstFrom.Top, lstTo.Height = lstFrom.Height.

the above is untested pseudocode off the top of my head that has a better than average chance of working the first time. *g*

>I agree that it should be simple, but for some reason it doesn't work for me. I believe my logic in the method is OK, but the controls refuse to resize :(((
>
>Would you please check this thread #1407699 and see if you can spot the problem?
df (was a 10 time MVP)

df FoxPro website
FoxPro Wiki site online, editable knowledgebase
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform