Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Grid -how to size to outer container?
Message
De
15/01/2007 15:37:19
 
 
À
15/01/2007 15:07:32
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Versions des environnements
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
Visual FoxPro
Divers
Thread ID:
01185226
Message ID:
01185711
Vues:
15
>Here's the expression, term by term (and simpler one at that - I've noticed that the n and columncount were annulling each other)

>
nWidth=this.width-iif(bittest(this.ScrollBars,1),Sysmetric(5),0)-4
The VMP code also had the "+4" in it. And I don't think you were nulling out anything with the column count as "n" is equal to the width of all columns except the last one. In my case, the numbers came up something like this (which might give a clue to what is going on); I will show the values of the vars before the whole line is evaluated. Here was your original code:
nWidth=this.width-n-iif(bittest(this.ScrollBars,1),Sysmetric(5)+this.ColumnCount,0)-4
THIS.Width = 519
n=254 && width of column 1 to 5
Bittest() = .T.
Sysmetric(5) = 18
THIS.ColumnCount = 6

So nWidth evaluated to 237. Original column width was 238 and somehow the VMP code evaluated it to 239 which is what threw it wonky. Having your code run or restoring the manual width I set before their code ran fixes it.

I am not sure why you added in THIS.ColumnCount - is that to handle the fact that there is a 1 pixel wide vertical line between columns?

Albert
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform