Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to trap Autofit() button
Message
De
14/10/2004 18:31:13
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Visual FoxPro Beta
Divers
Thread ID:
00951253
Message ID:
00951587
Vues:
9
This message has been marked as a message which has helped to the initial question of the thread.
Call grid.GridHitTest() from the grid.Click()?

Update!
Hmm, that didn't work, but a BINDEVENT to a column object resize did work.

In the form.Init, I did:
this.AddProperty("fitter")
this.fitter = NEWOBJECT("fitter","fitter.prg")
BINDEVENT(this.grid1.column1,"resize",thisform.fitter,"gridfitter",1)
And in the fitter.prg I had:
DEFINE CLASS fitter AS custom
  FUNCTION gridfitter
  WAIT WINDOW "autofit fired"
  ENDFUNC
ENDDEFINE
Note this also fires when you resize column1, so maybe you could also employ GridHitTest to determine if the AutoSize was indeed where the hit took place.


>Yes I could do it like this
>
>I'm really looking for an event on that small button on the upper left corner. They manage to put one on the deletemark so why not on the autofit button?
>
>
>>Luc,
>>
>>Then perhaps you want to turn off AutoFit all together, and just call your column sizing code each time the grid is regenerated? This could be done with the property.
>>
>>>I'm using a grid that is dynamic, it rebuilds itself and I want to set columns width just after the Autofit() method. This way the columns won't change size once the grid is regenerated.
Fred
Microsoft Visual FoxPro MVP

foxcentral.net
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform