Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Simulating mover button in grid
Message
 
 
À
01/08/2010 10:45:36
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Vista
Network:
Windows 2003 Server
Database:
MS SQL Server
Divers
Thread ID:
01474774
Message ID:
01474801
Vues:
56
>>Hi everybody,
>>
>>I'd like to simulate mover's button appearance using a special grid with moverbars class. My problem is, that trying to set button's picture in MouseEnter event doesn't seem to work.
>>
>>I want to show the double arrow only when I'm moving my cursor over the button. Is there a way to achieve this appearance?
>>
>>Thanks in advance.
>Naomi,
>
>I believe your best bet is to create a special buttonclass which you implent in your grid.
>The MouseEnter - MouseDown and MouseLeade methods can be used to activate the appropiate picture file.
>This should not be rock sience.
>
>Best regards,
>
>Koen

I believe I did it. I added the code in Init method of the GridMover:

this.colMover.DynamicFontShadow = "this.SetMover()"

The set mover method is
IF this.nRecNo == RECNO(this.RecordSource) 
   this.colMover.cmdMove.Caption = 'o'
ELSE
   this.colMover.cmdMove.Caption = ''
ENDIF

RETURN .F.
colMover.FontName = "Windings3"

Finally, in form's instance of the gridmover AfterMove method I had to SetFocus to the Column3 (Order) column - otherwise the picture will not show.

I think I'll put this issue now to rest - already spent several hours last night and today trying to make the effect I wanted.
If it's not broken, fix it until it is.


My Blog
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform