Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Boudewijn Lutgerink
  Where is Boudewijn Lutgerink?
 Hoonaardstraat, Driel
 Netherlands
 Boudewijn Lutgerink
 To: noex Palic
  Where is noex Palic?
 Bacolod
 Philippines
 noex Palic
 Tags
Subject: RE: how to create a class?
Thread ID: 113509 Message ID: 113562 # Views: 39 # Ratings: 1
Version: Visual FoxPro 9 Category: Classes and Objects
Date: Monday, November 20, 2006 10:11:53 AM         
   


> hello experts, how to create a customized button? i have an image created from photoshop i want to have a rounded button with two tone color. how can i create a class, based on commnand button? and imitate the image i created?\<br />>
>
> Regards,
>
>
> Glenn

Subclassing each and every control you use on your forms (including the form itself) is always good, it gives you more control over the desired behavior. Thus looking at the Create Class in the helpfile, as Eric already told you is THE place to start with.

In your particular case you could add a button to a form, in the init of the button set its top to something big, like 1000 (this.top = 1000)

Then add the image to your form.
In the init of the form add this line
BindEvent( this.image1, "click", this.command1, "click")

Clicking on the image then fires the code in the command button click.

A sample is added to this message, showing you what I mean:
http://www.foxite.com/uploads/f257fc79-c647-4cfa-8137-0e20f8db28a5.zip

Boudewijn LutgeĀ®ink
The attitude of "An eye for an eye and a tooth for a tooth" will make this world toothless and blind (Ghandi)

COMPLETE THREAD

how to create a class? Posted by noex Palic @ 11/19/2006 3:30:05 PM
RE: how to create a class? Posted by Eric den Doop @ 11/20/2006 6:51:28 AM
RE: how to create a class? Posted by noex Palic @ 11/20/2006 10:38:45 AM
RE: how to create a class? Posted by Boudewijn Lutgerink @ 11/20/2006 10:11:53 AM
RE: how to create a class? Posted by noex Palic @ 11/20/2006 10:42:42 AM