>Hi All,
>
>I was wondering how to refresh a listbox on a parent form
>from a child form lauched using the do form command?
>
>The users see a list of options they can add to the listbox of
>the parent form. Since the parent form is still partially
>visible from the child form, I would like to refresh the
>parent listbox.
>
>I used to do this with a SHOW GET LEVEL x in FPW 2.6
>
>I guess I am still trying to get pass the infamous learning curve... :)
>
>Any help would be appreciated.
>
>Thanks in advance
>
>Pascal
Pascal, if you launch your forms with the NAME clause, like:
DO FORM myForm1 NAME ParentForm
you can issue
ParentForm.listbox1.Refresh()
Or, you can pass the parent form object as a parameter when you call the child form:
DO FORM myForm1 WITH thisform
and in INIT() of child form assign the parameter to the form property (say, .oCallingForm
then call it like
thisform.oCallingForm.listbox1.refresh()
Don't forget to set this property to .NULL. when you close the child form.
Nick
Nick Neklioudov
Universal Thread Consultant
3 times Microsoft MVP - Visual FoxPro
"I have not failed. I've just found 10,000 ways that don't work." - Thomas Edison