Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Design time re-size
Message
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Versions des environnements
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP
Network:
Windows 2003 Server
Database:
MS SQL Server
Divers
Thread ID:
01406083
Message ID:
01407862
Vues:
89
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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform