Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Grid: preventing column from moving or resizing
Message
De
25/03/2005 14:47:05
 
 
À
25/03/2005 14:20:32
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00999191
Message ID:
00999216
Vues:
26
>Fabio,
>
>> when LockColumns is not zero, all columns are not movable.
>
>Thanks for pointing that out. What do you think about my idea of blocking mouse events on specific column headers via transparent shapes? Any drawbacks to this approach? It seems the be the only viable solution ... ?
>
>Malcolm

Malcolm,
if you try it you found many VFP's draw bugs,
but this is useless
because the shape don't stop the header moving.
This because VFP uses the MouseMove x displacement only,
and ignore the ZOrder.

You have a solution only:
Set Grid.Columns.Movable = .F.
and implement the column's moving into
the Header MouseDown ( with or without MouseMove )
with VFP coding.
With this you fix the Right/Left bound limit,
the LockColumns issue and you can implement
a schema with moving into subgroup columns only, ....
This is not very complex.

For the BorderGrid issue, it is possible
( BUT NOT SIMPLE )
with two modes:

- into VFP8/9, this is not complex,
but it is not very efficient
( VFP copy the internal graphic buffer into OS buffer
and you write into OS buffer with OS's GDI APIs)
- BINDEVENT(thisform,"Paint",Grid,"AfterPaint",1)
* Grid.AfterPaint
uses GDI+ API to overwrite the GridBorder
- into VFP9, this is complex,
intercept form PAINT message,
capture the grid buffer redraw point ( !!!!! )
uses Thisform.Box() with OBJTOCLIENT(grid)
for redraw the gridBorder into the VFP graphic buffer

Fabio
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform