Boa tarde,
Sou iniciante em Xailer e queria entender como fazer isto:
No TLabel informamos o conteúdo abaixo, por ex:
::oMsg:nClrText:=clRed
::oMsg:nClrPane:=clYellow
::oMsg:cText:="OK"
Como fazer para preencher a TLabel através de uma Function()?
Ex:
MSG(1,"OK")
FUNCTION MSG(f1,f2)
IF f1=1
::oMsg:nClrPane:=clGreen
::oMsg:nClrText:=clYellow
ELSEIF f1=2
::oMsg:nClrText:=clRed
::oMsg:nClrPane:=clYellow
ENDIF
::oMsg:cText:=f2
RETURN .T.
Ao compilar acusa:
Warning W0001 Ambiguos referente: 'SELF' e não funciona.
grato
Mário
www.eMeAsOfT.com.br
In order for this site to work correctly we need to store a small file (called a cookie) on your computer. Most every site in the world does this, however since the 25th of May 2011, by law we have to get your permission first. Please abandon the forum if you disagree.
Para que este foro funcione correctamente es necesario guardar un pequeño fichero (llamado cookie) en su ordenador. La mayoría de los sitios de Internet lo hacen, no obstante desde el 25 de Marzo de 2011 y por ley, necesitamos de su permiso con antelación. Abandone este foro si no está conforme.
Para que este foro funcione correctamente es necesario guardar un pequeño fichero (llamado cookie) en su ordenador. La mayoría de los sitios de Internet lo hacen, no obstante desde el 25 de Marzo de 2011 y por ley, necesitamos de su permiso con antelación. Abandone este foro si no está conforme.
TLabel X Function()
TLabel X Function()
Mário,
Msg( ::oMsg, 1, "OK" )
FUNCTION Msg( oMsg, f1, f2 )
IF f1=1
oMsg:nClrPane:=clGreen
oMsg:nClrText:=clYellow
ELSEIF f1=2
oMsg:nClrText:=clRed
oMsg:nClrPane:=clYellow
ENDIF
oMsg:cText:=f2
RETURN .T.
--
Un saludo,
José F. Giménez
http://www.xailer.com
http://www.xailer.info
Msg( ::oMsg, 1, "OK" )
FUNCTION Msg( oMsg, f1, f2 )
IF f1=1
oMsg:nClrPane:=clGreen
oMsg:nClrText:=clYellow
ELSEIF f1=2
oMsg:nClrText:=clRed
oMsg:nClrPane:=clYellow
ENDIF
oMsg:cText:=f2
RETURN .T.
--
Un saludo,
José F. Giménez
http://www.xailer.com
http://www.xailer.info
-
- Mensajes: 180
- Registrado: Lun Sep 15, 2008 2:53 pm
TLabel X Function()
Mário yo uso METHOD en lugar de FUNCTION
Ej:
CLASS TFormDetalleCtaCte FROM TForm
COMPONENT .....
COMPONENT.....
METHOD MostrarDatos( nF1, cF2 )
METHOD ......
METHOD.....
ENDCLASS
Y abajo
METHOD MostrarDatos( nF1, cF2 ) CLASS TFormDetalleCtaCte
IF nF1=1
::oMsg:nClrPane:=clGreen
::oMsg:nClrText:=clYellow
ELSEIF nF1=2
::oMsg:nClrText:=clRed
::oMsg:nClrPane:=clYellow
ENDIF
::oMsg:cText:= cF2
Return Nil
Para llamarlo usa ::MostrarDatos( 1, "Hola" )
Juan
"Mário Angelini" <mario@emeasoft.com.br> escribió en el mensaje
news:49d651a1$[email=1@svctag-j7w3v3j....]1@svctag-j7w3v3j....[/email]
> Boa tarde,
> Sou iniciante em Xailer e queria entender como fazer isto:
>
>
> No TLabel informamos o conteúdo abaixo, por ex:
> ::oMsg:nClrText:=clRed
> ::oMsg:nClrPane:=clYellow
> ::oMsg:cText:="OK"
>
>
>
> Como fazer para preencher a TLabel através de uma Function()?
> Ex:
> MSG(1,"OK")
>
>
> FUNCTION MSG(f1,f2)
> IF f1=1
> ::oMsg:nClrPane:=clGreen
> ::oMsg:nClrText:=clYellow
> ELSEIF f1=2
> ::oMsg:nClrText:=clRed
> ::oMsg:nClrPane:=clYellow
> ENDIF
> ::oMsg:cText:=f2
>
> RETURN .T.
>
> Ao compilar acusa:
> Warning W0001 Ambiguos referente: 'SELF' e não funciona.
>
> grato
> Mário
> www.eMeAsOfT.com.br
Ej:
CLASS TFormDetalleCtaCte FROM TForm
COMPONENT .....
COMPONENT.....
METHOD MostrarDatos( nF1, cF2 )
METHOD ......
METHOD.....
ENDCLASS
Y abajo
METHOD MostrarDatos( nF1, cF2 ) CLASS TFormDetalleCtaCte
IF nF1=1
::oMsg:nClrPane:=clGreen
::oMsg:nClrText:=clYellow
ELSEIF nF1=2
::oMsg:nClrText:=clRed
::oMsg:nClrPane:=clYellow
ENDIF
::oMsg:cText:= cF2
Return Nil
Para llamarlo usa ::MostrarDatos( 1, "Hola" )
Juan
"Mário Angelini" <mario@emeasoft.com.br> escribió en el mensaje
news:49d651a1$[email=1@svctag-j7w3v3j....]1@svctag-j7w3v3j....[/email]
> Boa tarde,
> Sou iniciante em Xailer e queria entender como fazer isto:
>
>
> No TLabel informamos o conteúdo abaixo, por ex:
> ::oMsg:nClrText:=clRed
> ::oMsg:nClrPane:=clYellow
> ::oMsg:cText:="OK"
>
>
>
> Como fazer para preencher a TLabel através de uma Function()?
> Ex:
> MSG(1,"OK")
>
>
> FUNCTION MSG(f1,f2)
> IF f1=1
> ::oMsg:nClrPane:=clGreen
> ::oMsg:nClrText:=clYellow
> ELSEIF f1=2
> ::oMsg:nClrText:=clRed
> ::oMsg:nClrPane:=clYellow
> ENDIF
> ::oMsg:cText:=f2
>
> RETURN .T.
>
> Ao compilar acusa:
> Warning W0001 Ambiguos referente: 'SELF' e não funciona.
>
> grato
> Mário
> www.eMeAsOfT.com.br
TLabel X Function()
Perfeito!!!!
Thanks
"Mário Angelini" <mario@emeasoft.com.br> escreveu na mensagem
news:49d651a1$[email=1@svctag-j7w3v3j....]1@svctag-j7w3v3j....[/email]
> Boa tarde,
> Sou iniciante em Xailer e queria entender como fazer isto:
>
>
> No TLabel informamos o conteúdo abaixo, por ex:
> ::oMsg:nClrText:=clRed
> ::oMsg:nClrPane:=clYellow
> ::oMsg:cText:="OK"
>
>
>
> Como fazer para preencher a TLabel através de uma Function()?
> Ex:
> MSG(1,"OK")
>
>
> FUNCTION MSG(f1,f2)
> IF f1=1
> ::oMsg:nClrPane:=clGreen
> ::oMsg:nClrText:=clYellow
> ELSEIF f1=2
> ::oMsg:nClrText:=clRed
> ::oMsg:nClrPane:=clYellow
> ENDIF
> ::oMsg:cText:=f2
>
> RETURN .T.
>
> Ao compilar acusa:
> Warning W0001 Ambiguos referente: 'SELF' e não funciona.
>
> grato
> Mário
> www.eMeAsOfT.com.br
Thanks
"Mário Angelini" <mario@emeasoft.com.br> escreveu na mensagem
news:49d651a1$[email=1@svctag-j7w3v3j....]1@svctag-j7w3v3j....[/email]
> Boa tarde,
> Sou iniciante em Xailer e queria entender como fazer isto:
>
>
> No TLabel informamos o conteúdo abaixo, por ex:
> ::oMsg:nClrText:=clRed
> ::oMsg:nClrPane:=clYellow
> ::oMsg:cText:="OK"
>
>
>
> Como fazer para preencher a TLabel através de uma Function()?
> Ex:
> MSG(1,"OK")
>
>
> FUNCTION MSG(f1,f2)
> IF f1=1
> ::oMsg:nClrPane:=clGreen
> ::oMsg:nClrText:=clYellow
> ELSEIF f1=2
> ::oMsg:nClrText:=clRed
> ::oMsg:nClrPane:=clYellow
> ENDIF
> ::oMsg:cText:=f2
>
> RETURN .T.
>
> Ao compilar acusa:
> Warning W0001 Ambiguos referente: 'SELF' e não funciona.
>
> grato
> Mário
> www.eMeAsOfT.com.br