Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Can not get the logic right
Message
 
 
To
23/06/2009 10:03:33
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:
01407699
Message ID:
01407789
Views:
39
Jim/Ed,

I'm sorry, but do you see why this code
DODEFAULT()
LOCAL lnAdjust, lnButtonsHeight, lnNewTop, lnBetweenListsSpace, lnExtraWidth, lnNewHeight

lnNewHeight = (this.Height - this.lstDestination.Top - 2)

STORE  m.lnNewHeight TO this.lstDestination.Height, this.lstSource.Height

lnButtonsHeight = 132
lnNewTop = (m.lnNewHeight - m.lnButtonsHeight)/2
lnAdjust =  m.lnNewTop - this.cmdMoveOne.Top

this.cmdMoveOne.Top = m.lnNewTop
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 
lnExtraWidth = (this.Width - (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 

*STORE 45 TO this.lstDestination.Anchor, this.lstSource.Anchor 
*STORE 768 TO this.cmdMoveAll.Anchor, this.cmdMoveOne.Anchor, this.cmdRemoveAll.Anchor, this.cmdRemoveOne.Anchor 
produces the attached image? Both lists are supposed to be the same in height - why the first one is different than the second?

And also what is wrong with the buttons positions? I want to position them in the middle of the listboxes.
If it's not broken, fix it until it is.


My Blog
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform