Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

radio buttons

radio buttons

radio buttons

I have a option group(3 radio buttons]) as below.

I want to call the method declared before when I select each option. As an example, when I choose option A, method A needs to be called. I want to write a Do Case for this scenario . How can I do this in FoxPro?
Thank you

RE: radio buttons

First of all, an option group has the Interactivechange method to use for reacting to a user interaction. The value then already has changed to be the number of the active option button.

And then, from the VFP language, you have DO CASE as in:


Do case
   Case this.Value = 1
      * call method1
   Case this.Value = 2
      * call method2
   Case this.Value = 3
      * call method3


RE: radio buttons

Thanks for the reply
How to call a method ?
If I provide only the method name is it fine ?

RE: radio buttons


If I provide only the method name is it fine ?

No, you have to specify the object to which the method belongs. For example, if it is a method of the form, you would call it as THISFORM.Method1. If it is a method of another form, you would call it as oForm.Method1 (where oForm is an object reference to the form.)

If the "method" is in fact a simple procedure or function, rather than an actual method, then you just need its name.

If the method is to return a value, you need to add parentheses, like this:x = oForm.Method1(). You would also need parens if you are passing a parameter (just like when you call a function).


Mike Lewis (Edinburgh, Scotland)

Visual FoxPro articles, tips and downloads

RE: radio buttons

Thanks Mike for the immediate response
Helps a lot..

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close