Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Slick trick for a command button
Message
De
07/11/2005 23:04:35
 
 
À
07/11/2005 22:54:00
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9
OS:
Windows XP SP2
Network:
Windows 2000 Server
Database:
Visual FoxPro
Divers
Thread ID:
01065541
Message ID:
01066292
Vues:
19
>>>For a command button
>>>
>>>Mouse Enter
>>>
>>>LPARAMETERS nButton, nShift, nXCoord, nYCoord
>>>this.caption = "Some text"
>>>
>>>Mouse leave
>>>
>>>LPARAMETERS nButton, nShift, nXCoord, nYCoord
>>>this.caption = ""
>>>
>>>Create and place a jpg the size of the button, over the button. I use a gradient fill in the jpg.
>>>
>>>When the mouse passes over the jpg, it will raise like an eyelid and expose the text on the button for clicking.
>>
>>Hi Grady
>>
>>As per your code above, you place this in the Mouse Enter/Leave of the button and then place a JPG OVER the button.
>>
>>In that case the Mouse Enter and Leave of the button would never be fired,since the JPG is sitting over the button and its Mouse events would fire.
>>
>>Have you left out something or am I missing something?
>>
>> Save to: Default
>>
>>
>>
>>
>>
>>Switch color theme
>>Select message background color...
>>Select message area width...
>>Disable message width in percentage
>>Change toolbar background color...
>>Adjust message text font size...
>>Disable auto links
>>Enable acronyms
>>Disable message header
>>Enable auto quote
>>Re: Slick trick for a command button Thread #1065541 Message #1065986
>>
>>Try setting special effects for the command button to 2 (hot tracking)
>
>Yes, but with the image OVER the button how will it's (the button) events fire? That was my question.
>
>Doing as you describe in your original post:
>
>"Create and place a jpg the size of the button, over the button. I use a gradient fill in the jpg."
>
>With the jpg "over the button" as you say, the button never gets any mouse events so of what use is entering code in the Mouse Enter and Mouse Leave events?
>
>Could you explain a bit more please?
>-------------------------------------
>It works on my 386 1 gig computer using VFP 9. Have you tried it yet?
>-------------------------------------


AHa you are online. Yes I certainly tried it just to be sure. I placed a button on the form, added code to the Mouse Enter & Leave ebvents.

Then I added an Image object and set its picture property to a JPG. I then moved this image OVER the button to completely cover it. Now all I can see is the JPG. I run the form. Nothing. Nada. I set event tracking on to trace events, but only the Events for the Image object get activated. The button being UNDER the image object never gets any events.

Please explain how you did it.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform