Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Can not get the logic right
Message
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Titre:
Can not get the logic right
Versions des environnements
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP
Network:
Windows 2003 Server
Database:
MS SQL Server
Divers
Thread ID:
01407699
Message ID:
01407699
Vues:
168
Hi everybody,

I'm trying to adjust the positions / dimensions of the controls inside the mover control. Do you see my problems in this code?
** Would changing anchor settings be enough for auto-resize?
STORE (this.Height - this.lstDestination.Top)  TO this.lstDestination.Height, this.lstSource.Height
LOCAL lnAdjust, lnButtonsHeight, lnNewTop, lnBetweenListsSpace, lnExtraWidth
lnButtonsHeight = 176 
lnNewTop = (this.Height - lnButtonsHeight)/2
lnAdjust =  lnNewTop - this.cmdMoveOne.Top

this.cmdMoveOne.Top = lnNewTop + m.lnAdjust  
this.cmdMoveAll.Top = this.cmdMoveAll.Top + m.lnAdjust   
this.cmdReMoveOne.Top = this.cmdReMoveOne.Top + m.lnAdjust  
this.cmdReMoveAll.Top = this.cmdReMoveAll.Top + m.lnAdjust  
lnBetweenListsSpace = this.lstDestination.Left - this.lstSource.Width && assuming that lstSource.Left = 0  
lnExtraWidth = (this.Height - (2*this.lstDestination.Width + m.lnBetweenListsSpace))/2
STORE (this.lstDestination.Width + m.lnExtraWidth) TO this.lstSource.Width, this.lblDestination.Width 
STORE (this.cmdMoveAll.Left + m.lnExtraWidth) TO this.cmdMoveAll.Left, this.cmdMoveOne.Left, ;
 												 this.cmdReMoveAll.Left, this.cmdReMoveOne.Left
this.lblDestination.Left = this.lblDestination.Left + m.lnExtraWidth
this.lstDestination.Left = this.lstDestination.Left + m.lnExtraWidth 
If it's not broken, fix it until it is.


My Blog
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform