Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
What was the last object I had focus on?
Message
From
06/08/2010 12:04:58
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP2
Network:
Novell 6.x
Database:
Visual FoxPro
Application:
Desktop
Miscellaneous
Thread ID:
01475139
Message ID:
01475547
Views:
46
Naomi,

I understand using the loop to force it to work with all underlying objects within objects such as grids and containers. I also see that one of the BaseClass she lists is [form] because basically the form is a container of objects as well, but for some reason it does not force it into the command button objects. I tried adding [commandbutton] and it errors out, but when I do not, it does not force it into the method of command buttons.


Kevin,

The reason Marcia has the extra code at the top is to try to separate objects that are collections (such as grid, container, pageframe, etc.) from the non-container based objects (such as commandbutton, textbox, editbox, etc.). For the former we need to call that method recursively.

So, don't add commandbutton to the list in the beginning of the code.

>In the code Marcia sent listed below, it starts to loop thru all objects in each of the baseclass types listed to push the code into the method provided. When using the code with a textbox displaying the results as I click/tab around, I notice that command buttons are not recognized, so I tried to add the base class for them into the code (i.e. IF INLIST...(toObject.BaseClass)),[form], [pageframe], [page], [container], [grid], [column], [commandbutton])) and the code errors out by adding the commandbutton type. I am trying to figure out how to get the code to recognise command buttons as well.
>
>
>Can you explain your question? What exactly is not working for you?
>
The three chief virtues of a programmer are: Laziness, Impatience and Hubris. (Larry Wall)



My Blog



PluralSight Learning Library
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform