*-----------------------------------------------------------------------------------------
#Include "TOTVS.CH"
User Function TSayHtml()
DEFINE DIALOG oDlg TITLE "Exemplo TSay com HTML" FROM 180,180 TO 550,700 PIXEL
// Cria fonte para ser usada na Get
oFont := TFont():New('Courier new',,-18,.T.)
// Monta o Texto no formato HTML
cTextHtml := '<img src="C:\Totvs\ApData\system\BB_Logo.bmp"><br>'+;
'<font size=2 color=red>Linha 01 Vermelha<br>'+;
'<font size=3 color=green>Linha 02 Verde<br>'+;
'<font size=4 color=pink>Linha 03 Pink<br>'+;
'<font size=5 color=blue>Linha 04 Azul'+;
'<hr>'+;
'<font size=2 color=black>'+;
'<table border=1 cellpadding=0 cellspacing=0>'+;
'<tr>'+;
'<td width=100 bgcolor="#FFFF87">Coluna 01a'+;
'<td width=200 bgcolor="#FFFF87">Coluna 02a'+;
'<td width=100 bgcolor="#FFFF87">Coluna 03a'+;
'<tr>'+;
'<td>Coluna 01b'+;
'<td>Coluna 02b'+;
'<td>Coluna 03b'+;
'<tr>'+;
'<td>Coluna 01c'+;
'<td>Coluna 02c'+;
'<td>Coluna 03c'+;
'</table>'
// Cria o Say permitindo texto no formato HMTL
lHtml := .T.
oSay:= TSay():New(01,01,{||cTextHtml},oDlg,,oFont,,,,.T.,,,200,50,,,,,,lHtml)
ACTIVATE DIALOG oDlg CENTERED
Return
*-----------------------------------------------------------------------------------------
Resultado:
#Include "TOTVS.CH"
User Function TSayHtml()
DEFINE DIALOG oDlg TITLE "Exemplo TSay com HTML" FROM 180,180 TO 550,700 PIXEL
// Cria fonte para ser usada na Get
oFont := TFont():New('Courier new',,-18,.T.)
// Monta o Texto no formato HTML
cTextHtml := '<img src="C:\Totvs\ApData\system\BB_Logo.bmp"><br>'+;
'<font size=2 color=red>Linha 01 Vermelha<br>'+;
'<font size=3 color=green>Linha 02 Verde<br>'+;
'<font size=4 color=pink>Linha 03 Pink<br>'+;
'<font size=5 color=blue>Linha 04 Azul'+;
'<hr>'+;
'<font size=2 color=black>'+;
'<table border=1 cellpadding=0 cellspacing=0>'+;
'<tr>'+;
'<td width=100 bgcolor="#FFFF87">Coluna 01a'+;
'<td width=200 bgcolor="#FFFF87">Coluna 02a'+;
'<td width=100 bgcolor="#FFFF87">Coluna 03a'+;
'<tr>'+;
'<td>Coluna 01b'+;
'<td>Coluna 02b'+;
'<td>Coluna 03b'+;
'<tr>'+;
'<td>Coluna 01c'+;
'<td>Coluna 02c'+;
'<td>Coluna 03c'+;
'</table>'
// Cria o Say permitindo texto no formato HMTL
lHtml := .T.
oSay:= TSay():New(01,01,{||cTextHtml},oDlg,,oFont,,,,.T.,,,200,50,,,,,,lHtml)
ACTIVATE DIALOG oDlg CENTERED
Return
*-----------------------------------------------------------------------------------------
Resultado:
Nenhum comentário :
Postar um comentário