control reference from modules

General Help regarding HMG, Compilation, Linking, Samples

Moderator: Rathinagiri

Post Reply
User avatar
arturo_lopesoria
Posts: 31
Joined: Tue Sep 09, 2008 3:05 am
Location: Mexico

control reference from modules

Post by arturo_lopesoria »

Hello
I want to know how to make a reference to a control from a module other than main prg.

Example: ConnMgr.RadGrp_Enviar.Value:=i where ConnMgr is a window (other y than main window).

Problem: I can not make this reference be know from other prg module other than main.prg

Hola a todos.
Como puedo hacer que una referencia a un control del tipo:
ConnMgr.RadGrp_Enviar.Value:=i
donde ConnMgr es una ventana distinta de la ventana principal.

Problema: No he podido hacer que la referencia sea conocida desde un modulo distinto al programa pirncipal main.prg

Gracias.
User avatar
luisvasquezcl
Posts: 1258
Joined: Thu Jul 31, 2008 3:23 am
Location: Chile
Contact:

Re: control reference from modules

Post by luisvasquezcl »

Hola ARturo
Debes declarar la ventana en el programa desde donde vas a llamarla.
por ejemplo
Tienes en el Main.prg
define window Form_1
define button button_1
.... tus definiciones
end button
activate window form_1

En el programa Programa2.prg
procedure miproc()
DECLARE WINDOW form_1

form_1.button_1.caption := 'Nueva caption'
return

De esa forma puedes hacerlo.
Saludos cordiales desde Chile,
Luis Vasquez
User avatar
arturo_lopesoria
Posts: 31
Joined: Tue Sep 09, 2008 3:05 am
Location: Mexico

Re: control reference from modules

Post by arturo_lopesoria »

Si, con eso ha quedado Solucionado.
Muchas Gracias Luis.
Post Reply