Dica (wvw) substituir os drawlabel por um xcomando @ xx,say
Enviado: 17 Set 2007 10:07
Para quem não sabe fazer retangulos com wvw, vejam o exemplo,
Da um novo visual ao sistem alterando pouca coisa.
outra opção e usar o drawlabel, bem como fica dificil alterar todo o sistema fiz um xcomando que altera em todo o sistema o @ x, say para
o unico problema e onde tem @ x,say get, ainda não criei um @ x,say get
#xcommand @ <x>,<y> SAY <xvar> =>;
wvw_drawlabel(, <x>, <y>, <xvar>,,, ;
RGB( 0, 255, 255 ), RGB( 100, 135, 220 ),;
"Arial",,, 2 )
@ 06,50 say "Valor Unitário"
@ 12,50 say "SubTotal"
@ 23,65 say "Seu Logotipo aqui"
* wvw_drawlabel(, 06, 50, "Valor Unitário",,, RGB( 0, 255, 255 ), RGB( 100, 135, 220 ), "Tahoma",,, 2 )
* wvw_drawlabel(, 12, 50, "Subtotal" ,,, RGB( 0, 255, 255 ), RGB( 100, 135, 220 ), "Tahoma",,, 2 )
* wvw_drawlabel(, 23, 65, "Seu logotipo aqui",,, RGB( 0, 255, 255 ), RGB( 100, 135, 220 ), "Tahoma",,, 2 )
ps. o exemplo em anexo foi postado em https://pctoledo.org/forum/viewto ... a8a367b793,
fiz a adptação.
para mim foi util , talvez seja para vocês tambem.
Da um novo visual ao sistem alterando pouca coisa.
outra opção e usar o drawlabel, bem como fica dificil alterar todo o sistema fiz um xcomando que altera em todo o sistema o @ x, say para
o unico problema e onde tem @ x,say get, ainda não criei um @ x,say get
#xcommand @ <x>,<y> SAY <xvar> =>;
wvw_drawlabel(, <x>, <y>, <xvar>,,, ;
RGB( 0, 255, 255 ), RGB( 100, 135, 220 ),;
"Arial",,, 2 )
@ 06,50 say "Valor Unitário"
@ 12,50 say "SubTotal"
@ 23,65 say "Seu Logotipo aqui"
* wvw_drawlabel(, 06, 50, "Valor Unitário",,, RGB( 0, 255, 255 ), RGB( 100, 135, 220 ), "Tahoma",,, 2 )
* wvw_drawlabel(, 12, 50, "Subtotal" ,,, RGB( 0, 255, 255 ), RGB( 100, 135, 220 ), "Tahoma",,, 2 )
* wvw_drawlabel(, 23, 65, "Seu logotipo aqui",,, RGB( 0, 255, 255 ), RGB( 100, 135, 220 ), "Tahoma",,, 2 )
ps. o exemplo em anexo foi postado em https://pctoledo.org/forum/viewto ... a8a367b793,
fiz a adptação.
para mim foi util , talvez seja para vocês tambem.
Código: Selecionar todos
#include "inkey.ch"
#include "common.ch"
#include "setcurs.ch"
#include "winuser.ch" //from what32
#define COR_DE_FUNDO setcolor("3/9")
#define COR_WINDOWS_XP setcolor( 'N/W,N/GR*,,,N/W*' )
#define COR_NORMAL setcolor("N/W*,GR+/B*,N/N,GR+/N*,W+/N*,R/W*,W/W*,B/W*")
***************
FUNCTION MAIN()
***************
REQUEST HB_GT_WIN
REQUEST HB_GT_WVW_DEFAULT
REQUEST HB_LANG_PT
REQUEST HB_CODEPAGE_PT850
HB_LANGSELECT( 'PT' )
// dbsetdriver("DBFCDX")
hb_setcodepage("PT850")
set confirm on
set deleted on
set bell off
set scoreboard off
set eventmask to INKEY_ALL
set date british
set epoch to 1950
ConfigCores()
WVW_SetFont(,'Ms Sans Serif', 16, 8,, 'PROOF_QUALITY' )
wvw_setmaincoord(.F.)
wvw_noclose()
//wvw_size_ready(.T.)
wvw_SetPaintRefresh(0)
WVW_SetCodePage(,250)
wvw_SetVertCaret(.F.)
wvw_enableshortcuts(0,.T.)
wvw_maximize(0)
wvw_settitle( , "PDV - Frente de Loja" )
COR_WINDOWS_XP
scroll()
wvw_drawboxraised(,01,01,04,97)
COR_DE_FUNDO
@ 01, 01 clear to 04, 97
COR_WINDOWS_XP
wvw_drawboxraised(,06,01,28,47)
COR_NORMAL
@ 06, 01 clear to 28, 47
COR_WINDOWS_XP
wvw_drawboxraised(,30,01,32,97)
COR_NORMAL
@ 30, 01 clear to 32, 97
COR_WINDOWS_XP
wvw_drawboxraised(,06,49,10,97)
wvw_drawboxraised(,12,49,16,97)
wvw_drawboxraised(,18,49,28,97)
COR_DE_FUNDO
@ 06, 49 clear to 10, 97
@ 12, 49 clear to 16, 97
@ 18, 49 clear to 28, 97
#xcommand @ <x>,<y> SAY <xvar> =>;
wvw_drawlabel(, <x>, <y>, <xvar>,,, ;
RGB( 0, 255, 255 ), RGB( 100, 135, 220 ),;
"Arial",,, 2 )
@ 06,50 say "Valor Unitário"
@ 12,50 say "SubTotal"
@ 23,65 say "Seu Logotipo aqui"
* wvw_drawlabel(, 06, 50, "Valor Unitário",,, RGB( 0, 255, 255 ), RGB( 100, 135, 220 ), "Tahoma",,, 2 )
* wvw_drawlabel(, 12, 50, "Subtotal" ,,, RGB( 0, 255, 255 ), RGB( 100, 135, 220 ), "Tahoma",,, 2 )
* wvw_drawlabel(, 23, 65, "Seu logotipo aqui",,, RGB( 0, 255, 255 ), RGB( 100, 135, 220 ), "Tahoma",,, 2 )
mcodigo := space(13)
mquant := 0.0
COR_NORMAL
@ 31,03 say "Código"
@ 31,72 say "QUANTIDADE"
* wvw_drawlabel(, 31, 03, "CÓDIGO :",,, aPalette[1], aPalette[16], "Tahoma",,, 2 )
* wvw_drawlabel(, 31, 72, "QUANTIDADE :",,, aPalette[1], aPalette[16], "Tahoma",,, 2 )
@ 31, 14 get mcodigo picture "9999999999999"
@ 31, 88 get mquant picture "@E 9999.99"
read
RETURN NIL
*********************
FUNCTION ConfigCores()
**********************
Public aPalette := WvW_GetPalette()
aPalette[01] := GetSysColor( COLOR_WINDOWTEXT ) // 8
aPalette[02] := RGB( 0, 51, 153 )
aPalette[04] := RGB( 0, 255, 255 )
aPalette[08] := GetSysColor( COLOR_BTNFACE ) // 15
aPalette[10] := RGB( 100, 135, 220 )
aPalette[13] := RGB( 227, 92, 47 )
WvW_SetPalette( aPalette )
RETURN NIL
FUNCTION RGB( red, green, blue )
//****
RETURN ( red + ( green * 256 ) + ( blue * 256 * 256 ) )
#ifdef __PLATFORM__Windows
#pragma BEGINDUMP
#include "windows.h"
#include "hbapi.h"
HB_FUNC ( GETSYSCOLOR )
{
int i = ISNIL(1) ? 0 : hb_parni(1);
if ( i >= 0 && i < 29 )
{
hb_retnl( (LONG) GetSysColor(i) );
}
}
#pragma ENDDUMP
#endif