Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Returning A value from a Class???
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Titre:
Returning A value from a Class???
Divers
Thread ID:
00668213
Message ID:
00668213
Vues:
51
Hello everyone!!!
I have a control called GetState. The GetState control is a container that has a text box and a command button the button calls a Form that has a listbox that has the states in it. you can click on it and it returns the the State abbreviation. It work fine until I tried to make the form that has the listbox a class.
Here is my old code
*** in the GetState.Command1.Click()
Do Form Getstate To lcMyState  
THIS.PARENT.RFI_TEXTBOX1.VALUE = ALLTRIM(lcMystate)
THIS.PARENT.VALUE = ALLTRIM( lcMystate)
THIS.PARENT.VALID()
What I want to do is:
oMyState = Createobject('GetState')
oMyState.show()
** some how catch what ever state is chosen. 
*** (the way the form works is that on double click, it grabs the state
*** releases the form and returns the value to the textbox)

*** theory code
lcMystate = oMystate.value
THIS.PARENT.RFI_TEXTBOX1.VALUE = ALLTRIM(lcMystate)
THIS.PARENT.VALUE = ALLTRIM( lcMystate)
THIS.PARENT.VALID()
Of course when I try this it doesn't work. It will flash and I guess hides behind something.
I can't get it to stay on top. I really wouldn't know how to return a value if I got it to stay on top. The property is marked to always be on top. But of course it doesn't do that.

So I guess my question is:
How can I get my call a classed form and return a value to the textbox.
And is there something special that I have to do to the actual Classed form?

Thanks in advance?
What is Wisdom?
Wisdom - The ability to respond to any situation according to God's Plan.
Therefore:
USE Wisdom IN Everything ORDER priority AS Knowledge
SELECT Knowledge
BROWSE FOR Understanding WHERE Wisdom=Guide

LeRoy Jackson
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform