Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Prevent grid from horizontal 'scrolling'
Message
De
25/05/2005 15:39:36
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
 
 
À
25/05/2005 09:45:18
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Divers
Thread ID:
01017496
Message ID:
01017630
Vues:
29
>When enter is pressed in the next to last column, the grid shows empty whitespace to the right (sort of an empty column) and hides column one.
>
>This is confusing and annoying - so how can this behaviour be suppressed?

I've solved it this way. At the end of grid's (class level) .init I'm setting the width of the last column to just fit:
n=0
FOR i=1 to this.ColumnCount-1
	n = n + this.Columns[i].width
endfor
* bittest is there in case we don't have a vertical scrollbar
this.Columns[this.columncount].width=this.width-n   ;
   -iif(bittest(this.ScrollBars,1),Sysmetric(5)+this.ColumnCount,0)-4
The sysmetric() call gives the width of the vertical scrollbar. And 4 is the rule-of-thumb amount for the grid's own border, padding etc whatever it may have.

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform