Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Can not get the logic right
Message
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Title:
Can not get the logic right
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP
Network:
Windows 2003 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
01407699
Message ID:
01407699
Views:
169
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
Next
Reply
Map
View

Click here to load this message in the networking platform