SR.MANUEL MERCADO-BKEYDOWN TSBROWSE

SR.MANUEL MERCADO-BKEYDOWN TSBROWSE

Postby MGA » Sat Apr 05, 2008 2:54 pm

Sr. Manuel Mercado, a tecla ESC (VK_ESCAPE) na TSBROWSE não responde. ex:


obrw:bkeydown:={|nkey| if(nkey==VK_ESCAPE,odlg:end(),)}

Como resolver Maestro.
ubiratanmga@gmail.com

FWH24.04
BCC7.3
HARBOUR3.2
xMate
Pelles´C
TDolphin
MGA
 
Posts: 1254
Joined: Mon Feb 25, 2008 2:54 pm
Location: Brasil/PR/Maringá

Re: SR.MANUEL MERCADO-BKEYDOWN TSBROWSE

Postby mmercado » Sat Apr 05, 2008 5:10 pm

SGS wrote:a tecla ESC (VK_ESCAPE) na TSBROWSE não responde. ex:
obrw:bkeydown:={|nkey| if(nkey==VK_ESCAPE,odlg:end(),)}

Disculpa José, pero es muy difícil detectar un error si no podemos reproducirlo, por favor envíame un ejemplo que yo pueda ejecutar para poder ayudarte.

Saludos.

Manuel Mercado
User avatar
mmercado
 
Posts: 782
Joined: Wed Dec 19, 2007 7:50 am
Location: Salamanca, Gto., México

Postby MGA » Mon Apr 07, 2008 11:04 am

Sr. Manuel Mercado, a tecla ESC (VK_ESCAPE), deveria funcionar com o BKEYDOWN no TSBROWSE?
ubiratanmga@gmail.com

FWH24.04
BCC7.3
HARBOUR3.2
xMate
Pelles´C
TDolphin
MGA
 
Posts: 1254
Joined: Mon Feb 25, 2008 2:54 pm
Location: Brasil/PR/Maringá

Postby MGA » Mon Apr 07, 2008 11:14 am

DEFINE WINDOW oWndChild OF ownd MDICHILD TITLE "Touch Screen" icon oico color GetSysColor(COLOR_BTNFACE),GetSysColor(COLOR_BTNFACE)

@ 8, 0 TABS oTabs PROMPTS " Vendas "," Outras Opções " OF oWndChild ;
message "Escolha a opção";
ACTION ( aDlgs[ nDlg ]:Hide(), nDlg := nOption,;
aDlgs[ nOption ]:Show(), aDlgs[ nOption ]:SetFocus() ) color CLR_BLACK

oTabs:bRClicked := { || nil }
oWndChild:oBottom := oTabs
oWndChild:bresized := { || IF(oWndChild#NIL,IF(!ISZOOMED(oWndChild:hwnd),oTabs:hide(),oTabs:show()),.T.) }
oWndChild:Resize()

DEFINE DIALOG oDlg2 RESOURCE "TOUCHTELA2" OF oWndChild

REDEFINE BROWSE oBrw2 ID 4016 OF oDlg1 FONT fonte_TCS

obRW2:setArray(subgrupos)
obRW2:Refresh()

obRW2:nHeightCell := 55
obRW2:lMChange := .F.
obRW2:lDrawHeaders:= .F.
obRW2:lFooting := .F.
obRW2:lNoMoveCols := .t.
OBRW2:LNORESETPOS := .T.
obRW2:bKeyDown := {|nKey| if(nKey==VK_ESCAPE,oWndChild:end(),.T.)}
obRW2:bchange := {|| carregaprodutos(If( Len(subgrupos)<1 .or. obRW2:nAt>Len(subgrupos),0,subgrupos[obRW2:nat,2]),@aprodsubs,@npg,@nto,tchbtn,tipo,fwdeabrtc,cDigProdvd) }
bColor := {|| If(oBrw2:nLogicPos() % 2 = 0, CLR_LGRAY , CLR_LGREEN ) }
obRW2:SetColor( { 1, 3, 4, 5, 6,9,10 , 13, 15, 11,12 }, ;
{ CLR_BLACK,;
CLR_BLACK,;
nRGB(211, 227, 247),;
CLR_WHITE,;
CLR_HBLUE,;
CLR_BLACK,;
nRGB(211, 227, 247),;
CLR_WHITE,;
CLR_BLACK,;
CLR_WHITE,;
CLR_HBBLUE } )


ADD COLUMN TO BROWSE obRW2 DATA ARRAY ELEMENT 1;
SIZE 126 ;
COLORS CLR_BLACK, bColor;
3DLOOK TRUE;
ALIGN DT_CENTER


ACTIVATE DIALOG oDlg2 NOWAIT ON INIT (oDlg2:Move( 0, 0 ) valid(if(owndchild==nil,.t.,.f.))

oDlg2:setfocus()
oDlg1:hide()
aDlgs :={ oDlg1, oDlg2 }
oWndChild:bkeydown:={|nkey| if(nkey==VK_ESCAPE,obRW2:SETFOCUS(),)}

ACTIVATE WINDOW oWndChild maximized
ubiratanmga@gmail.com

FWH24.04
BCC7.3
HARBOUR3.2
xMate
Pelles´C
TDolphin
MGA
 
Posts: 1254
Joined: Mon Feb 25, 2008 2:54 pm
Location: Brasil/PR/Maringá

Postby karinha » Mon Apr 07, 2008 4:14 pm

//-> Tente:
Code: Select all  Expand view  RUN
#define DLGC_WANTALLKEYS 4

oWndChild:nDlgCode := DLGC_WANTALLKEYS

//
oWndChild:bkeydown:={|nkey| if(nkey==VK_ESCAPE,obRW2:SETFOCUS(),)}
João Santos - São Paulo - Brasil - Phone: +55(11)95150-7341
User avatar
karinha
 
Posts: 7860
Joined: Tue Dec 20, 2005 7:36 pm
Location: São Paulo - Brasil

Postby MGA » Mon Apr 07, 2008 4:59 pm

Karinha, wndchild:nDlgcode não existe!
ubiratanmga@gmail.com

FWH24.04
BCC7.3
HARBOUR3.2
xMate
Pelles´C
TDolphin
MGA
 
Posts: 1254
Joined: Mon Feb 25, 2008 2:54 pm
Location: Brasil/PR/Maringá

Postby MGA » Mon Apr 07, 2008 5:02 pm

Sr. Manuel, pode falar o que estou fazendo de errado!?
ubiratanmga@gmail.com

FWH24.04
BCC7.3
HARBOUR3.2
xMate
Pelles´C
TDolphin
MGA
 
Posts: 1254
Joined: Mon Feb 25, 2008 2:54 pm
Location: Brasil/PR/Maringá

Postby karinha » Mon Apr 07, 2008 5:39 pm

Falla Nuestra:

Cambiar para obRW2.

kkkkk;
João Santos - São Paulo - Brasil - Phone: +55(11)95150-7341
User avatar
karinha
 
Posts: 7860
Joined: Tue Dec 20, 2005 7:36 pm
Location: São Paulo - Brasil

Postby MGA » Mon Apr 07, 2008 5:44 pm

#define DLGC_WANTALLKEYS 4


...


obRW2:nDlgCode := DLGC_WANTALLKEYS

OBRW2:bkeydown:={|nkey| if(nkey==VK_ESCAPE,MSG("TESTE"),)}


Karinha não funcionou!
ubiratanmga@gmail.com

FWH24.04
BCC7.3
HARBOUR3.2
xMate
Pelles´C
TDolphin
MGA
 
Posts: 1254
Joined: Mon Feb 25, 2008 2:54 pm
Location: Brasil/PR/Maringá

Postby mmercado » Mon Apr 07, 2008 5:57 pm

SGS wrote:REDEFINE BROWSE oBrw2 ID 4016 OF oDlg1 FONT fonte_TCS
Donde se define oDlg1?

Manuel Mercado
User avatar
mmercado
 
Posts: 782
Joined: Wed Dec 19, 2007 7:50 am
Location: Salamanca, Gto., México

Postby MGA » Mon Apr 07, 2008 6:31 pm

Sr. Manuel oDlg1, é uma segunda DIALOG que tenho, só não postei a parte dela para não ficar muito extenso o código fonte:

#include "FiveWin.ch"
#INCLUDE "wcolors.ch"
#INCLUDE "Voget.ch"
#INCLUDE "BTNGET.ch"
#INCLUDE "Image.ch"
#Include "SSay.ch"
#include "TSButton.ch"
#include "TSBrowse.ch"

#define TRANSPARENT 1

STATIC CLRT1,CLRT2,CLRT,nAGRmesa,nAGRcvend,aMesa,vtsay[5],otsay[4],nCodprodutoCover,nCodprodutoagrfech,;
nCodprodutoEntrada,nTtPagar,nTotEntra,nTotProSE,fonte_TC2

**********************************************************************************************************************************************
FUNCTION TouchScreen(APRODUTOS,mesatitulo,lfatesai,lfaturado,lGrava,lAchou,nPedido,aMes802r,cCliente,cCGCCPF,diskfone,diskclie,cMod,lvendabal)
**********************************************************************************************************************************************
Local aArqs,aFecha:={},pFaobRW,cDigProdvd:=arqpar->digprovd98,atual,tipo:=.t.,nTaxaServ,nFWHPROXSENHA,oFlashTime2,x,oGrouPro
Local oTabs,oDlg2,fonte_TCS,fonte_TCB,fonte_TCH,tchbtn[31],OCURFOT,fwexp,obtc[8],lpsair,lvbcontinua,fwdeabrtc,nStyleBut:=5
Local aDlgs,nDlg :=1,obRW2,subgrupos:={""},aprodsubs:={},Npg:=1,Nto:=1
Local lContrRestPct:=ContrRestPct(),FWHTCHCORTEXT,FWHTCHCORLI1F,FWHTCHCORLI2F
Local cDescContrF2 :=alltrim(pega_parametro('DESCCONTROLEVENDASF2','C',10))
Local cDescTipo :=iif(cMod == 'M', 'MESAS', cDescContrF2),FWHSTYLEBUTTON,FWHTCHBUTFUNDO,FWHTCHBUTTEXT

lpsair :=.f.
lvendabal :=if(lvendabal==nil,.f.,lvendabal)
fwdeabrtc :=pega_parametro('ABRDEPROTOUCHSCR','C',1)
nFWHPROXSENHA :=pega_parametro('FWHPROXSENHA','N',3)
nCodprodutoEntrada :=pega_parametro('FWHCODPROECAR','N',6)
nCodprodutoagrfech :=pega_parametro('FWHCODPROAGR','N',6)
nCodprodutoCover :=pega_parametro('FWHCODPROCOV','N',6)
FWHTCHCORLI1F :=pega_parametro('FWHTCHCORLI1F','N',12)
FWHTCHCORLI2F :=pega_parametro('FWHTCHCORLI2F','N',12)
FWHTCHCORTEXT :=pega_parametro('FWHTCHCORTEXT','N',12)
FWHSTYLEBUTTON :=pega_parametro('FWHSTYLEBUTTOUCH','C',9)
FWHTCHBUTFUNDO :=pega_parametro('FWHTCHBUTFUNDO','N',12)
FWHTCHBUTFUNDO :=IF(!EMPTY(FWHTCHBUTFUNDO),FWHTCHBUTFUNDO,CLR_GREEN)
FWHTCHBUTTEXT :=pega_parametro('FWHTCHBUTTEXT','N',12)
FWHTCHBUTTEXT :=IF(!EMPTY(FWHTCHBUTTEXT),FWHTCHBUTTEXT,CLR_BLACK)
CLRT1 :=IF(empty(FWHTCHCORLI1F),RGB(0,78,152),FWHTCHCORLI1F)
CLRT2 :=IF(empty(FWHTCHCORLI2F),RGB(17,120,206),FWHTCHCORLI2F)
CLRT :=IF(empty(FWHTCHCORTEXT),CLR_BLACK,FWHTCHCORTEXT)
vprod :=0
nTotEntra :=0
nTotProSE :=0
aProdtch :=APRODUTOS
vtsay[1] :=vtsay[2]:=vtsay[3]:=vtsay[4]:=vtsay[5]:=0
nTtPagar :=0
aArqs :={ 'profig','cadgss' }
nTaxaServ :=pega_parametro('TAXASERVICOSDEBALCAO','N',4)/100
nAGRmesa :=nMesa
nAGRcvend :=nCodVend
aMesa :=aMes802r

if !super_abre(aArqs, @aFecha)
return .f.
endif

IF pega_parametro('USAMOUSETOUCHSCR','C',1)=="S"
Desliga_Rato()
ENDIF

if nCodprodutoCover#0
if cadpro->(dbsetorder(1),dbseek(str(arqpar->filbase98,2)+str(nCodprodutoCover,6)))
if ! lvendabal
vtsay[5]:=(cadpro->prevend01*1)
endif
endif
endif

if ALLTRIM(FWHSTYLEBUTTON)=="RECT" ; nStyleBut:=1 ; ENDIF
if ALLTRIM(FWHSTYLEBUTTON)=="ROUND" ; nStyleBut:=2 ; ENDIF
if ALLTRIM(FWHSTYLEBUTTON)=="ROUNDRECT" ; nStyleBut:=3 ; ENDIF
if ALLTRIM(FWHSTYLEBUTTON)=="OFFICE" ; nStyleBut:=5 ; ENDIF
if ALLTRIM(FWHSTYLEBUTTON)=="XP" ; nStyleBut:=6 ; ENDIF
if ALLTRIM(FWHSTYLEBUTTON)=="CRYSTAL" ; nStyleBut:=7 ; ENDIF
if ALLTRIM(FWHSTYLEBUTTON)=="SUNSET" ; nStyleBut:=8 ; ENDIF


DEFINE CURSOR OCURFOT RESOURCE 'CURSOR_7'
Define Font fonte_TCH Name 'Times New Roman' Size -0,30
Define Font fonte_TCS Name 'Times New Roman' Size -0,16
Define Font fonte_TCB Name 'Times New Roman' Size -0,28 BOLD
if pVideo1>800
Define Font fonte_TC2 Name 'Lucida Console' Size -7,16
else
Define Font fonte_TC2 Name 'Lucida Console' Size -6,16
endif

DEFINE WINDOW oWndChild OF ownd MDICHILD TITLE "Touch Screen - "+mesatitulo icon oico color GetSysColor(COLOR_BTNFACE),GetSysColor(COLOR_BTNFACE)


@ 8, 0 TABS oTabs PROMPTS " Vendas "," Outras Opções " OF oWndChild ;
message "Escolha a opção";
ACTION ( aDlgs[ nDlg ]:Hide(), nDlg := nOption,;
aDlgs[ nOption ]:Show(), aDlgs[ nOption ]:SetFocus() ) color CLR_BLACK

oTabs:bRClicked := { || nil }
oWndChild:oBottom := oTabs
oWndChild:bresized := { || IF(oWndChild#NIL,IF(!ISZOOMED(oWndChild:hwnd),oTabs:hide(),oTabs:show()),.T.) }
oWndChild:Resize()
*************************************
* 1 dlg
*
DEFINE DIALOG oDlg1 RESOURCE if(pVideo1>800,"TOUCHTELA1","TOUCHTELAA800") OF oWndChild

redefine get oprod var vprod of oDlg1 id 4013 PICTURE "99999999999999" FONT fonte_TCH color CLR_BLUE valid(if(GetASyncKey(VK_RETURN) .or. GetASyncKey(VK_TAB),okenter(cMod,,npedido,lvendabal),.t.))

if cDigProdvd=="C"
if pVideo1>800
redefine listBox tcobRW1 Fields OF oDlg1 id 4012 COLORS CLR_BLACK,CLR_LGREEN SIZES 40,130,50
else
redefine listBox tcobRW1 Fields OF oDlg1 id 4012 COLORS CLR_BLACK,CLR_LGREEN SIZES 30,90,30
endif
else
if pVideo1>800
redefine listBox tcobRW1 Fields OF oDlg1 id 4012 COLORS CLR_BLACK,CLR_LGREEN SIZES 170,50
else
redefine listBox tcobRW1 Fields OF oDlg1 id 4012 COLORS CLR_BLACK,CLR_LGREEN SIZES 120,30
endif
endif

tcobRW1:lAdjBrowse := .f.
tcobRW1:lAdjLastCol := .t.
tcobRW1:nHeaderStyle := 3
tcobRW1:nLineStyle := 2
tcobRW1:nclrbackfocus:= {|| CLR_HBLUE}
tcobRW1:nClrNFBack := {|| CLR_HBBLUE}
tcobRW1:nHeaderHeight:= 17
tcobRW1:nLineHeight := if(pVideo1>800,18,17)
tcobRW1:nFreeze := 3
if cDigProdvd=="C"
tcobRW1:aFJustify := {2,1,1}
tcobRW1:aHJustify := {2,0,1}
tcobRW1:aJustify := {2,0,1}
tcobRW1:aHeaders := {"Cód.","Descrição","Qtde"}
tcobRW1:nClrPane := {|| IF(tcobRW1:nat % 2 == 0,CLR_LGRAY,CLR_LGREEN)}
tcobRW1:bLine := {|| If( Len(aProdtch)<1 .or. tcobRW1:nAt>Len(aProdtch),array(3),;
{ trans(aProdtch[tcobRW1:nat,1],'999999'),;
trans(aProdtch[tcobRW1:nat,2],'@!'),;
trans(aProdtch[tcobRW1:nat,4],'9999.999')})}

tcobRW1:aFooters :={"","Total de Serviços:"+CRLF+"Total Geral:",trans(0,"@E 999,999.99")+CRLF+trans(0,"@E 999,999.99")}
else
tcobRW1:aFJustify := {1,1}
tcobRW1:aHJustify := {0,1}
tcobRW1:aJustify := {0,1}
tcobRW1:aHeaders := {"Descrição","Qtde"}
tcobRW1:nClrPane := {|| IF(tcobRW1:nat % 2 == 0,CLR_LGRAY,CLR_LGREEN)}
tcobRW1:bLine := {|| If( Len(aProdtch)<1 .or. tcobRW1:nAt>Len(aProdtch),array(2),;
{ trans(aProdtch[tcobRW1:nat,2],'@!'),;
trans(aProdtch[tcobRW1:nat,4],'9999.999')})}

tcobRW1:aFooters :={"Total de Serviços:"+CRLF+"Total Geral:",trans(0,"@E 999,999.99")+CRLF+trans(0,"@E 999,999.99")}

endif
tcobRW1:nFooterHeight:= if(pVideo1>800,25,23)
tcobRW1:nFooterStyle := 11
tcobRW1:lDrawFooters := .T.
tcobRW1:setArray(aProdtch)
tcobRW1:Refresh()

***sub-grupos

REDEFINE BROWSE oBrw2 ID 4016 OF oDlg1 FONT fonte_TCS COLOR CLR_LGRAY , CLR_LGREEN

obRW2:setArray(subgrupos)
obRW2:Refresh()
obRW2:nHeightCell := 55
obRW2:lMChange := .F.
obRW2:lDrawHeaders:= .F.
obRW2:lFooting := .F.
obRW2:lNoMoveCols := .t.
obRW2:bchange := {|| carregaprodutos(If( Len(subgrupos)<1 .or. obRW2:nAt>Len(subgrupos),0,subgrupos[obRW2:nat,2]),@aprodsubs,@npg,@nto,tchbtn,tipo,fwdeabrtc,cDigProdvd) }
obRW2:bKeyDown := {|nKey| if(FWTECLASEDITAVEIS(nkey),(oprod:setfocus(),keybd_event(nKey,,,0)),Nil),;
if(nKey==VK_ESCAPE,oWndChild:end(),NIL)}
bColor := {|| If(oBrw2:nLogicPos() % 2 = 0,CLR_LGRAY , CLR_LGREEN ) }
obRW2:SetColor( { 1, 3, 4, 5, 6,9,10 , 13, 15, 11,12 }, ;
{ CLR_BLACK,;
CLR_BLACK,;
nRGB(211, 227, 247),;
CLR_WHITE,;
CLR_HBLUE,;
CLR_BLACK,;
nRGB(211, 227, 247),;
CLR_WHITE,;
CLR_BLACK,;
CLR_WHITE,;
CLR_HBBLUE } )

ADD COLUMN TO BROWSE obRW2 DATA ARRAY ELEMENT 1;
SIZE 126 ;
COLORS CLR_BLACK, bColor;
3DLOOK TRUE;
ALIGN DT_CENTER
****imagens


REDEFINE image ToBti[1] ID 4053 OF oDlg1 PIXEL ADJUST ON CLICK (achareg(nPG,1,aprodsubs,cMod,npedido,obRW2,lvendabal)) CURSOR ocurfot ON RIGHT CLICK TOUCHAMPLIARFIG(ToBti[1])
REDEFINE image ToBti[2] ID 4054 OF oDlg1 PIXEL ADJUST ON CLICK (achareg(nPG,2,aprodsubs,cMod,npedido,obRW2,lvendabal)) CURSOR ocurfot ON RIGHT CLICK TOUCHAMPLIARFIG(ToBti[2])
REDEFINE image ToBti[3] ID 4055 OF oDlg1 PIXEL ADJUST ON CLICK (achareg(nPG,3,aprodsubs,cMod,npedido,obRW2,lvendabal)) CURSOR ocurfot ON RIGHT CLICK TOUCHAMPLIARFIG(ToBti[3])
REDEFINE image ToBti[4] ID 4056 OF oDlg1 PIXEL ADJUST ON CLICK (achareg(nPG,4,aprodsubs,cMod,npedido,obRW2,lvendabal)) CURSOR ocurfot ON RIGHT CLICK TOUCHAMPLIARFIG(ToBti[4])
REDEFINE image ToBti[5] ID 4057 OF oDlg1 PIXEL ADJUST ON CLICK (achareg(nPG,5,aprodsubs,cMod,npedido,obRW2,lvendabal)) CURSOR ocurfot ON RIGHT CLICK TOUCHAMPLIARFIG(ToBti[5])
REDEFINE image ToBti[6] ID 4058 OF oDlg1 PIXEL ADJUST ON CLICK (achareg(nPG,6,aprodsubs,cMod,npedido,obRW2,lvendabal)) CURSOR ocurfot ON RIGHT CLICK TOUCHAMPLIARFIG(ToBti[6])

REDEFINE image ToBti[7] ID 4059 OF oDlg1 PIXEL ADJUST ON CLICK (achareg(nPG,7,aprodsubs,cMod,npedido,obRW2,lvendabal)) CURSOR ocurfot ON RIGHT CLICK TOUCHAMPLIARFIG(ToBti[7])
REDEFINE image ToBti[8] ID 4060 OF oDlg1 PIXEL ADJUST ON CLICK (achareg(nPG,8,aprodsubs,cMod,npedido,obRW2,lvendabal)) CURSOR ocurfot ON RIGHT CLICK TOUCHAMPLIARFIG(ToBti[8])
REDEFINE image ToBti[9] ID 4061 OF oDlg1 PIXEL ADJUST ON CLICK (achareg(nPG,9,aprodsubs,cMod,npedido,obRW2,lvendabal)) CURSOR ocurfot ON RIGHT CLICK TOUCHAMPLIARFIG(ToBti[9])
REDEFINE image ToBti[10] ID 4062 OF oDlg1 PIXEL ADJUST ON CLICK (achareg(nPG,10,aprodsubs,cMod,npedido,obRW2,lvendabal)) CURSOR ocurfot ON RIGHT CLICK TOUCHAMPLIARFIG(ToBti[10])
REDEFINE image ToBti[11] ID 4063 OF oDlg1 PIXEL ADJUST ON CLICK (achareg(nPG,11,aprodsubs,cMod,npedido,obRW2,lvendabal)) CURSOR ocurfot ON RIGHT CLICK TOUCHAMPLIARFIG(ToBti[11])
REDEFINE image ToBti[12] ID 4064 OF oDlg1 PIXEL ADJUST ON CLICK (achareg(nPG,12,aprodsubs,cMod,npedido,obRW2,lvendabal)) CURSOR ocurfot ON RIGHT CLICK TOUCHAMPLIARFIG(ToBti[12])

REDEFINE image ToBti[13] ID 4065 OF oDlg1 PIXEL ADJUST ON CLICK (achareg(nPG,13,aprodsubs,cMod,npedido,obRW2,lvendabal)) CURSOR ocurfot ON RIGHT CLICK TOUCHAMPLIARFIG(ToBti[13])
REDEFINE image ToBti[14] ID 4066 OF oDlg1 PIXEL ADJUST ON CLICK (achareg(nPG,14,aprodsubs,cMod,npedido,obRW2,lvendabal)) CURSOR ocurfot ON RIGHT CLICK TOUCHAMPLIARFIG(ToBti[14])
REDEFINE image ToBti[15] ID 4067 OF oDlg1 PIXEL ADJUST ON CLICK (achareg(nPG,15,aprodsubs,cMod,npedido,obRW2,lvendabal)) CURSOR ocurfot ON RIGHT CLICK TOUCHAMPLIARFIG(ToBti[15])
REDEFINE image ToBti[16] ID 4068 OF oDlg1 PIXEL ADJUST ON CLICK (achareg(nPG,16,aprodsubs,cMod,npedido,obRW2,lvendabal)) CURSOR ocurfot ON RIGHT CLICK TOUCHAMPLIARFIG(ToBti[16])
REDEFINE image ToBti[17] ID 4069 OF oDlg1 PIXEL ADJUST ON CLICK (achareg(nPG,17,aprodsubs,cMod,npedido,obRW2,lvendabal)) CURSOR ocurfot ON RIGHT CLICK TOUCHAMPLIARFIG(ToBti[17])
REDEFINE image ToBti[18] ID 4070 OF oDlg1 PIXEL ADJUST ON CLICK (achareg(nPG,18,aprodsubs,cMod,npedido,obRW2,lvendabal)) CURSOR ocurfot ON RIGHT CLICK TOUCHAMPLIARFIG(ToBti[18])

REDEFINE image ToBti[19] ID 4071 OF oDlg1 PIXEL ADJUST ON CLICK (achareg(nPG,19,aprodsubs,cMod,npedido,obRW2,lvendabal)) CURSOR ocurfot ON RIGHT CLICK TOUCHAMPLIARFIG(ToBti[19])
REDEFINE image ToBti[20] ID 4072 OF oDlg1 PIXEL ADJUST ON CLICK (achareg(nPG,20,aprodsubs,cMod,npedido,obRW2,lvendabal)) CURSOR ocurfot ON RIGHT CLICK TOUCHAMPLIARFIG(ToBti[20])
REDEFINE image ToBti[21] ID 4073 OF oDlg1 PIXEL ADJUST ON CLICK (achareg(nPG,21,aprodsubs,cMod,npedido,obRW2,lvendabal)) CURSOR ocurfot ON RIGHT CLICK TOUCHAMPLIARFIG(ToBti[21])
REDEFINE image ToBti[22] ID 4074 OF oDlg1 PIXEL ADJUST ON CLICK (achareg(nPG,22,aprodsubs,cMod,npedido,obRW2,lvendabal)) CURSOR ocurfot ON RIGHT CLICK TOUCHAMPLIARFIG(ToBti[22])
REDEFINE image ToBti[23] ID 4075 OF oDlg1 PIXEL ADJUST ON CLICK (achareg(nPG,23,aprodsubs,cMod,npedido,obRW2,lvendabal)) CURSOR ocurfot ON RIGHT CLICK TOUCHAMPLIARFIG(ToBti[23])
REDEFINE image ToBti[24] ID 4076 OF oDlg1 PIXEL ADJUST ON CLICK (achareg(nPG,24,aprodsubs,cMod,npedido,obRW2,lvendabal)) CURSOR ocurfot ON RIGHT CLICK TOUCHAMPLIARFIG(ToBti[24])

for x:=1 to len(ToBti)
ToBti[x]:Progress(.f.)
next

if pVideo1>800
***Texto na imagem
ToBti[01]:bPainted := { |hDC| FWOnPaint( hDC, if(cDigProdvd=="C",RIGHT(ToBtc[01]:ccaption,6),RIGHT(ToBtc[01]:ccaption,13)) , fonte_TC2) }
ToBti[02]:bPainted := { |hDC| FWOnPaint( hDC, if(cDigProdvd=="C",RIGHT(ToBtc[02]:ccaption,6),RIGHT(ToBtc[02]:ccaption,13)) , fonte_TC2) }
ToBti[03]:bPainted := { |hDC| FWOnPaint( hDC, if(cDigProdvd=="C",RIGHT(ToBtc[03]:ccaption,6),RIGHT(ToBtc[03]:ccaption,13)) , fonte_TC2) }
ToBti[04]:bPainted := { |hDC| FWOnPaint( hDC, if(cDigProdvd=="C",RIGHT(ToBtc[04]:ccaption,6),RIGHT(ToBtc[04]:ccaption,13)) , fonte_TC2) }
ToBti[05]:bPainted := { |hDC| FWOnPaint( hDC, if(cDigProdvd=="C",RIGHT(ToBtc[05]:ccaption,6),RIGHT(ToBtc[05]:ccaption,13)) , fonte_TC2) }
ToBti[06]:bPainted := { |hDC| FWOnPaint( hDC, if(cDigProdvd=="C",RIGHT(ToBtc[06]:ccaption,6),RIGHT(ToBtc[06]:ccaption,13)) , fonte_TC2) }
ToBti[07]:bPainted := { |hDC| FWOnPaint( hDC, if(cDigProdvd=="C",RIGHT(ToBtc[07]:ccaption,6),RIGHT(ToBtc[07]:ccaption,13)) , fonte_TC2) }
ToBti[08]:bPainted := { |hDC| FWOnPaint( hDC, if(cDigProdvd=="C",RIGHT(ToBtc[08]:ccaption,6),RIGHT(ToBtc[08]:ccaption,13)) , fonte_TC2) }
ToBti[09]:bPainted := { |hDC| FWOnPaint( hDC, if(cDigProdvd=="C",RIGHT(ToBtc[09]:ccaption,6),RIGHT(ToBtc[09]:ccaption,13)) , fonte_TC2) }
ToBti[10]:bPainted := { |hDC| FWOnPaint( hDC, if(cDigProdvd=="C",RIGHT(ToBtc[10]:ccaption,6),RIGHT(ToBtc[10]:ccaption,13)) , fonte_TC2) }
ToBti[11]:bPainted := { |hDC| FWOnPaint( hDC, if(cDigProdvd=="C",RIGHT(ToBtc[11]:ccaption,6),RIGHT(ToBtc[11]:ccaption,13)) , fonte_TC2) }
ToBti[12]:bPainted := { |hDC| FWOnPaint( hDC, if(cDigProdvd=="C",RIGHT(ToBtc[12]:ccaption,6),RIGHT(ToBtc[12]:ccaption,13)) , fonte_TC2) }
ToBti[13]:bPainted := { |hDC| FWOnPaint( hDC, if(cDigProdvd=="C",RIGHT(ToBtc[13]:ccaption,6),RIGHT(ToBtc[13]:ccaption,13)) , fonte_TC2) }
ToBti[14]:bPainted := { |hDC| FWOnPaint( hDC, if(cDigProdvd=="C",RIGHT(ToBtc[14]:ccaption,6),RIGHT(ToBtc[14]:ccaption,13)) , fonte_TC2) }
ToBti[15]:bPainted := { |hDC| FWOnPaint( hDC, if(cDigProdvd=="C",RIGHT(ToBtc[15]:ccaption,6),RIGHT(ToBtc[15]:ccaption,13)) , fonte_TC2) }
ToBti[16]:bPainted := { |hDC| FWOnPaint( hDC, if(cDigProdvd=="C",RIGHT(ToBtc[16]:ccaption,6),RIGHT(ToBtc[16]:ccaption,13)) , fonte_TC2) }
ToBti[17]:bPainted := { |hDC| FWOnPaint( hDC, if(cDigProdvd=="C",RIGHT(ToBtc[17]:ccaption,6),RIGHT(ToBtc[17]:ccaption,13)) , fonte_TC2) }
ToBti[18]:bPainted := { |hDC| FWOnPaint( hDC, if(cDigProdvd=="C",RIGHT(ToBtc[18]:ccaption,6),RIGHT(ToBtc[18]:ccaption,13)) , fonte_TC2) }
ToBti[19]:bPainted := { |hDC| FWOnPaint( hDC, if(cDigProdvd=="C",RIGHT(ToBtc[19]:ccaption,6),RIGHT(ToBtc[19]:ccaption,13)) , fonte_TC2) }
ToBti[20]:bPainted := { |hDC| FWOnPaint( hDC, if(cDigProdvd=="C",RIGHT(ToBtc[20]:ccaption,6),RIGHT(ToBtc[20]:ccaption,13)) , fonte_TC2) }
ToBti[21]:bPainted := { |hDC| FWOnPaint( hDC, if(cDigProdvd=="C",RIGHT(ToBtc[21]:ccaption,6),RIGHT(ToBtc[21]:ccaption,13)) , fonte_TC2) }
ToBti[22]:bPainted := { |hDC| FWOnPaint( hDC, if(cDigProdvd=="C",RIGHT(ToBtc[22]:ccaption,6),RIGHT(ToBtc[22]:ccaption,13)) , fonte_TC2) }
ToBti[23]:bPainted := { |hDC| FWOnPaint( hDC, if(cDigProdvd=="C",RIGHT(ToBtc[23]:ccaption,6),RIGHT(ToBtc[23]:ccaption,13)) , fonte_TC2) }
ToBti[24]:bPainted := { |hDC| FWOnPaint( hDC, if(cDigProdvd=="C",RIGHT(ToBtc[24]:ccaption,6),RIGHT(ToBtc[24]:ccaption,13)) , fonte_TC2) }
endif

***SAYS

REDEFINE SENSITIVE say ToBtc[1] var VoBtc[1] ID 4023 OF oDlg1 PIXEL font fonte_TC2 COLOROVER CLR_YELLOW ACTION(achareg(nPG,1,aprodsubs,cMod,npedido,obRW2,lvendabal)) CENTER COLOR CLRT,CLRT1 UPDATE
REDEFINE SENSITIVE say ToBtc[2] var VoBtc[2] ID 4024 OF oDlg1 PIXEL font fonte_TC2 COLOROVER CLR_YELLOW ACTION(achareg(nPG,2,aprodsubs,cMod,npedido,obRW2,lvendabal)) CENTER COLOR CLRT,CLRT1 UPDATE
REDEFINE SENSITIVE say ToBtc[3] var VoBtc[3] ID 4025 OF oDlg1 PIXEL font fonte_TC2 COLOROVER CLR_YELLOW ACTION(achareg(nPG,3,aprodsubs,cMod,npedido,obRW2,lvendabal)) CENTER COLOR CLRT,CLRT1 UPDATE
REDEFINE SENSITIVE say ToBtc[4] var VoBtc[4] ID 4026 OF oDlg1 PIXEL font fonte_TC2 COLOROVER CLR_YELLOW ACTION(achareg(nPG,4,aprodsubs,cMod,npedido,obRW2,lvendabal)) CENTER COLOR CLRT,CLRT1 UPDATE
REDEFINE SENSITIVE say ToBtc[5] var VoBtc[5] ID 4027 OF oDlg1 PIXEL font fonte_TC2 COLOROVER CLR_YELLOW ACTION(achareg(nPG,5,aprodsubs,cMod,npedido,obRW2,lvendabal)) CENTER COLOR CLRT,CLRT1 UPDATE
REDEFINE SENSITIVE say ToBtc[6] var VoBtc[6] ID 4028 OF oDlg1 PIXEL font fonte_TC2 COLOROVER CLR_YELLOW ACTION(achareg(nPG,6,aprodsubs,cMod,npedido,obRW2,lvendabal)) CENTER COLOR CLRT,CLRT1 UPDATE

REDEFINE SENSITIVE say ToBtc[7] var VoBtc[7] ID 4029 OF oDlg1 PIXEL font fonte_TC2 COLOROVER CLR_YELLOW ACTION(achareg(nPG,7,aprodsubs,cMod,npedido,obRW2,lvendabal)) CENTER COLOR CLRT,CLRT2 UPDATE
REDEFINE SENSITIVE say ToBtc[8] var VoBtc[8] ID 4030 OF oDlg1 PIXEL font fonte_TC2 COLOROVER CLR_YELLOW ACTION(achareg(nPG,8,aprodsubs,cMod,npedido,obRW2,lvendabal)) CENTER COLOR CLRT,CLRT2 UPDATE
REDEFINE SENSITIVE say ToBtc[9] var VoBtc[9] ID 4031 OF oDlg1 PIXEL font fonte_TC2 COLOROVER CLR_YELLOW ACTION(achareg(nPG,9,aprodsubs,cMod,npedido,obRW2,lvendabal)) CENTER COLOR CLRT,CLRT2 UPDATE
REDEFINE SENSITIVE say ToBtc[10] var VoBtc[10] ID 4032 OF oDlg1 PIXEL font fonte_TC2 COLOROVER CLR_YELLOW ACTION(achareg(nPG,10,aprodsubs,cMod,npedido,obRW2,lvendabal)) CENTER COLOR CLRT,CLRT2 UPDATE
REDEFINE SENSITIVE say ToBtc[11] var VoBtc[11] ID 4033 OF oDlg1 PIXEL font fonte_TC2 COLOROVER CLR_YELLOW ACTION(achareg(nPG,11,aprodsubs,cMod,npedido,obRW2,lvendabal)) CENTER COLOR CLRT,CLRT2 UPDATE
REDEFINE SENSITIVE say ToBtc[12] var VoBtc[12] ID 4034 OF oDlg1 PIXEL font fonte_TC2 COLOROVER CLR_YELLOW ACTION(achareg(nPG,12,aprodsubs,cMod,npedido,obRW2,lvendabal)) CENTER COLOR CLRT,CLRT2 UPDATE

REDEFINE SENSITIVE say ToBtc[13] var VoBtc[13] ID 4035 OF oDlg1 PIXEL font fonte_TC2 COLOROVER CLR_YELLOW ACTION(achareg(nPG,13,aprodsubs,cMod,npedido,obRW2,lvendabal)) CENTER COLOR CLRT,CLRT1 UPDATE
REDEFINE SENSITIVE say ToBtc[14] var VoBtc[14] ID 4036 OF oDlg1 PIXEL font fonte_TC2 COLOROVER CLR_YELLOW ACTION(achareg(nPG,14,aprodsubs,cMod,npedido,obRW2,lvendabal)) CENTER COLOR CLRT,CLRT1 UPDATE
REDEFINE SENSITIVE say ToBtc[15] var VoBtc[15] ID 4037 OF oDlg1 PIXEL font fonte_TC2 COLOROVER CLR_YELLOW ACTION(achareg(nPG,15,aprodsubs,cMod,npedido,obRW2,lvendabal)) CENTER COLOR CLRT,CLRT1 UPDATE
REDEFINE SENSITIVE say ToBtc[16] var VoBtc[16] ID 4038 OF oDlg1 PIXEL font fonte_TC2 COLOROVER CLR_YELLOW ACTION(achareg(nPG,16,aprodsubs,cMod,npedido,obRW2,lvendabal)) CENTER COLOR CLRT,CLRT1 UPDATE
REDEFINE SENSITIVE say ToBtc[17] var VoBtc[17] ID 4039 OF oDlg1 PIXEL font fonte_TC2 COLOROVER CLR_YELLOW ACTION(achareg(nPG,17,aprodsubs,cMod,npedido,obRW2,lvendabal)) CENTER COLOR CLRT,CLRT1 UPDATE
REDEFINE SENSITIVE say ToBtc[18] var VoBtc[18] ID 4040 OF oDlg1 PIXEL font fonte_TC2 COLOROVER CLR_YELLOW ACTION(achareg(nPG,18,aprodsubs,cMod,npedido,obRW2,lvendabal)) CENTER COLOR CLRT,CLRT1 UPDATE

REDEFINE SENSITIVE say ToBtc[19] var VoBtc[19] ID 4041 OF oDlg1 PIXEL font fonte_TC2 COLOROVER CLR_YELLOW ACTION(achareg(nPG,19,aprodsubs,cMod,npedido,obRW2,lvendabal)) CENTER COLOR CLRT,CLRT2 UPDATE
REDEFINE SENSITIVE say ToBtc[20] var VoBtc[20] ID 4042 OF oDlg1 PIXEL font fonte_TC2 COLOROVER CLR_YELLOW ACTION(achareg(nPG,20,aprodsubs,cMod,npedido,obRW2,lvendabal)) CENTER COLOR CLRT,CLRT2 UPDATE
REDEFINE SENSITIVE say ToBtc[21] var VoBtc[21] ID 4043 OF oDlg1 PIXEL font fonte_TC2 COLOROVER CLR_YELLOW ACTION(achareg(nPG,21,aprodsubs,cMod,npedido,obRW2,lvendabal)) CENTER COLOR CLRT,CLRT2 UPDATE
REDEFINE SENSITIVE say ToBtc[22] var VoBtc[22] ID 4044 OF oDlg1 PIXEL font fonte_TC2 COLOROVER CLR_YELLOW ACTION(achareg(nPG,22,aprodsubs,cMod,npedido,obRW2,lvendabal)) CENTER COLOR CLRT,CLRT2 UPDATE
REDEFINE SENSITIVE say ToBtc[23] var VoBtc[23] ID 4045 OF oDlg1 PIXEL font fonte_TC2 COLOROVER CLR_YELLOW ACTION(achareg(nPG,23,aprodsubs,cMod,npedido,obRW2,lvendabal)) CENTER COLOR CLRT,CLRT2 UPDATE
REDEFINE SENSITIVE say ToBtc[24] var VoBtc[24] ID 4046 OF oDlg1 PIXEL font fonte_TC2 COLOROVER CLR_YELLOW ACTION(achareg(nPG,24,aprodsubs,cMod,npedido,obRW2,lvendabal)) CENTER COLOR CLRT,CLRT2 UPDATE

***teclado

REDEFINE SBUTTON tchbtn[1] ID 4010 OF oDlg1 ACTION(okenter(cMod,,npedido,lvendabal),obrw2:setfocus()) CANCEL TEXT ON_CENTER FONT Fonte_TCB
REDEFINE SBUTTON tchbtn[2] ID 4019 OF oDlg1 ACTION(calculatch(0) ,obrw2:setfocus()) CANCEL TEXT ON_CENTER FONT Fonte_TCB
REDEFINE SBUTTON tchbtn[3] ID 4011 OF oDlg1 ACTION(tchclr() ,obrw2:setfocus()) CANCEL TEXT ON_CENTER FONT Fonte_TCB
REDEFINE SBUTTON tchbtn[4] ID 4007 OF oDlg1 ACTION(calculatch(1) ,obrw2:setfocus()) CANCEL TEXT ON_CENTER FONT Fonte_TCB
REDEFINE SBUTTON tchbtn[5] ID 4008 OF oDlg1 ACTION(calculatch(2) ,obrw2:setfocus()) CANCEL TEXT ON_CENTER FONT Fonte_TCB
REDEFINE SBUTTON tchbtn[6] ID 4009 OF oDlg1 ACTION(calculatch(3) ,obrw2:setfocus()) CANCEL TEXT ON_CENTER FONT fonte_TCB
REDEFINE SBUTTON tchbtn[7] ID 4004 OF oDlg1 ACTION(calculatch(4) ,obrw2:setfocus()) CANCEL TEXT ON_CENTER FONT fonte_TCB
REDEFINE SBUTTON tchbtn[8] ID 4005 OF oDlg1 ACTION(calculatch(5) ,obrw2:setfocus()) CANCEL TEXT ON_CENTER FONT fonte_TCB
REDEFINE SBUTTON tchbtn[9] ID 4006 OF oDlg1 ACTION(calculatch(6) ,obrw2:setfocus()) CANCEL TEXT ON_CENTER FONT fonte_TCB
REDEFINE SBUTTON tchbtn[10] ID 4001 OF oDlg1 ACTION(calculatch(7) ,obrw2:setfocus()) CANCEL TEXT ON_CENTER FONT fonte_TCB
REDEFINE SBUTTON tchbtn[11] ID 4002 OF oDlg1 ACTION(calculatch(8) ,obrw2:setfocus()) CANCEL TEXT ON_CENTER FONT fonte_TCB
REDEFINE SBUTTON tchbtn[12] ID 4003 OF oDlg1 ACTION(calculatch(9) ,obrw2:setfocus()) CANCEL TEXT ON_CENTER FONT fonte_TCB

REDEFINE group tchbtn[17] PROMPT "Produtos - Página: 1 de 1" ID 5555 OF oDlg1 transparent
if pVideo1>800
REDEFINE group PROMPT if(cDigProdvd=="C","Código do Produto:","Código de Barras do Produto:") ID 4014 OF oDlg1 transparent
else
REDEFINE group ID 4014 OF oDlg1 transparent
endif
REDEFINE group ID 4015 OF oDlg1 transparent
REDEFINE group ID 4051 OF oDlg1 transparent
REDEFINE group ID 4052 OF oDlg1 transparent

REDEFINE SBUTTON tchbtn[13] ID 4020 OF oDlg1 RESOURCE "DOWN" ACTION(obRW2:godown(),obRW2:setfocus()) CANCEL TEXT ON_BOTTOM
REDEFINE SBUTTON tchbtn[14] ID 4021 OF oDlg1 RESOURCE "UP" ACTION(obRW2:goup() ,obRW2:setfocus()) CANCEL TEXT ON_BOTTOM
REDEFINE SBUTTON tchbtn[15] ID 4018 OF oDlg1 RESOURCE "REGVOLTA" ACTION(mudapagina(@nPG,nTo,.f.,aprodsubs,tchbtn,tipo,tchbtn),obRW2:setfocus()) CANCEL TEXT ON_BOTTOM
REDEFINE SBUTTON tchbtn[16] ID 4022 OF oDlg1 RESOURCE "REGAVANCA" ACTION(mudapagina(@nPG,nTo,.t.,aprodsubs,tchbtn,tipo,tchbtn),obRW2:setfocus()) CANCEL TEXT ON_BOTTOM
REDEFINE SBUTTON tchbtn[18] ID 4084 OF oDlg1 RESOURCE "QUIT" ACTION(oWndChild:end()) CANCEL TEXT ON_BOTTOM
REDEFINE SBUTTON tchbtn[19] ID 4085 OF oDlg1 RESOURCE "MAME" ACTION(TECLADOTOUCH(fonte_TCH,@aProdtch),MostraTotalTC(aProdtch,@nTtPagar,nPedido,aMesa,vtsay,otsay,cMod,lvendabal),obRW2:setfocus()) CANCEL TEXT ON_BOTTOM
REDEFINE SBUTTON tchbtn[20] ID 4086 OF oDlg1 RESOURCE "DOWN" ACTION(tcobRW1:godown(),tcobRW1:setfocus()) CANCEL TEXT ON_BOTTOM
REDEFINE SBUTTON tchbtn[21] ID 4087 OF oDlg1 RESOURCE "UP" ACTION(tcobRW1:goup(),tcobRW1:setfocus()) CANCEL TEXT ON_BOTTOM
REDEFINE SBUTTON tchbtn[24] ID 4090 OF oDlg1 RESOURCE "OF1" ACTION(aProdutos:=aProdtch,EXCPRODUTO(tcobRW1:nat,@aProdutos,@aMesa),aProdtch:=aProdutos,obRW2:setfocus()) CANCEL TEXT ON_BOTTOM
REDEFINE SBUTTON tchbtn[22] ID 4089 OF oDlg1 RESOURCE "DELETE2" ACTION(atual:=tcobRW1:nAt,aProdutos:=aProdtch,fwexp:=Exprod(tcobRW1,@aProdutos,aMesa,npedido,cMod,.f.,tcobRW1:nAt,lvendabal),if(fwexp,(aProdtch:=APRODUTOS,tcobRW1:setArray(aProdtch),if(atual>1,tcobRW1:nat:=atual-1,),tcobRW1:Refresh()),),MostraTotalTC(aProdtch,@nTtPagar,nPedido,aMesa,vtsay,otsay,cMod,lvendabal),obRW2:setfocus()) CANCEL TEXT ON_BOTTOM
REDEFINE SBUTTON tchbtn[23] ID 4017 OF oDlg1 RESOURCE "NOTES" ACTION(oTabs:SetOption(2),oTabs:refresh(),MostraTotalTC(aProdtch,@nTtPagar,nPedido,aMesa,vtsay,otsay,cMod,lvendabal),pFaobRW:setfocus()) CANCEL TEXT ON_BOTTOM
if pVideo1>800
REDEFINE SBUTTON tchbtn[25] ID 4083 OF oDlg1 RESOURCE "IMAZOOM2" ACTION(fwhshowfig(aprodsubs,nPG,@TIPO,tchbtn[25]),obRW2:setfocus()) CANCEL TEXT ON_BOTTOM
else
REDEFINE SBUTTON tchbtn[25] ID 4083 OF oDlg1 RESOURCE "IMAZOOM2" ACTION(fwhshowfig(aprodsubs,nPG,@TIPO,tchbtn[25]),obRW2:setfocus()) CANCEL TEXT ON_BOTTOM
endif
REDEFINE SBUTTON tchbtn[26] ID 4088 OF oDlg1 RESOURCE "YES" ACTION(aProdutos:=aProdtch,FATURARMESATC(oDlg1,cMod,@lfatesai,@lfaturado,aProdutos,nPedido,cCliente,cCGCCPF,aMesa,diskfone,diskclie,nFWHPROXSENHA,lvendabal,@lvbcontinua),;
IF(lvbcontinua,(fwclearfornew(tcobRW1,pFaobRW,@aMesa,@aProdtch,@npedido,@nAGRmesa,@nAGRcvend,@vprod,@nTotEntra,@nTotProSE,@vtsay,@nTtPagar,@lpsair,@lfatesai,@lfaturado),MostraTotalTC(aProdtch,@nTtPagar,nPedido,aMesa,vtsay,otsay,cMod,lvendabal),obRW2:SETFOCUS()),(aProdtch:=aProdutos,obRW2:setfocus()))) CANCEL TEXT ON_BOTTOM
REDEFINE SBUTTON tchbtn[27] ID 4191 OF oDlg1 RESOURCE "CLI222" ACTION(fwclientePerman(@diskclie,.f.,.t.,.f.),obRW2:setfocus()) CANCEL TEXT ON_BOTTOM
REDEFINE SBUTTON tchbtn[28] ID 4048 OF oDlg1 action(obRW2:setfocus()) CANCEL TEXT ON_BOTTOM
REDEFINE SBUTTON tchbtn[29] ID 4047 OF oDlg1 action(obRW2:setfocus()) CANCEL TEXT ON_BOTTOM
REDEFINE SBUTTON tchbtn[30] ID 4049 OF oDlg1 action(obRW2:setfocus()) CANCEL TEXT ON_BOTTOM
REDEFINE SBUTTON tchbtn[31] ID 4050 OF oDlg1 action(obRW2:setfocus()) CANCEL TEXT ON_BOTTOM

for x:=1 to len(tchbtn)
if x#17 //17 group box
tchbtn[x]:nshape :=nStyleBut
tchbtn[x]:nClrFore:=FWHTCHBUTTEXT
tchbtn[x]:nClrBack:=FWHTCHBUTFUNDO
tchbtn[x]:nClrBord:=CLR_WHITE
endif
next

ACTIVATE DIALOG oDlg1 NOWAIT ON INIT (oDlg1:Move( 0, 0 ),if(cMod#"D",tchbtn[27]:DISABLE(),),tcobRW1:gobottom(),tcobRW1:nat:=LEN(aProdtch),carregasubgrupos(obRW2,@subgrupos),carregaprodutos(If( Len(subgrupos)<1 .or. obRW2:nAt>Len(subgrupos),0,subgrupos[obRW2:nat,2]),@aprodsubs,@npg,@nto,tchbtn,tipo,fwdeabrtc,cDigProdvd),XSETFOCUS(obRW2));
valid(if(owndchild==nil,.t.,.f.))

**********************
* dlg 2

DEFINE DIALOG oDlg2 RESOURCE if(pVideo1>800,"TOUCHTELA2","TOUCHTELAB800") OF oWndChild


REDEFINE group ID 4001 OF oDlg2 transparent

if pVideo1>800
redefine listBox pfaobRW Fields OF oDlg2 id 511 SIZES 45,100,365,80,80,80,70,20,35,80 COLORS CLR_BLACK,CLR_LGREEN
else
redefine listBox pfaobRW Fields OF oDlg2 id 511 SIZES 35,90 ,280,70,70,70,50,20,35,70 COLORS CLR_BLACK,CLR_LGREEN
endif

pFaobRW:lAdjBrowse := .t.
pFaobRW:lAdjLastCol := .t.
pFaobRW:aHJustify := {2,2,0,1,1,1,2,2,2,1}
pFaobRW:aJustify := {2,2,0,1,1,1,2,2,2,1}
pFaobRW:nHeaderStyle := 3
pFaobRW:nLineStyle := 2
pFaobRW:nclrbackfocus:= {|| CLR_HBLUE}
pFaobRW:nClrNFBack := {|| CLR_HBBLUE}
pFaobRW:nHeaderHeight:= if(pVideo1>800,33,31)
pFaobRW:nLineHeight := 36
pFaobRW:aHeaders := {"Itens","Código","Descrição do Produto","Quantidade","Unitário","Vlr.Total","Atend.","C",if(cMod=="M","Mesa",""),if(lContrRestPct .and. cMod#"D","",if(pVideo1>800,"Qtde Paga","Q.Paga"))}
pFaobRW:nClrPane := {|| IF(pFaobRW:nat % 2 == 0,CLR_LGRAY,CLR_LGREEN)}
pFaobRW:bLine := {|| If( Len(aProdtch)<1 .or. pFaobRW:nAt>Len(aProdtch),array(9),;
{ trans(pFaobRW:nat,"9999"),iif(cDigProdvd=='C',trans(aProdtch[pFaobRW:nat,1],'999999'),trans(aProdtch[pFaobRW:nat,8],'9999999999999')),;
alltrim(trans(aProdtch[pFaobRW:nat,2],'@!')),;
trans(aProdtch[pFaobRW:nat,4],'9999.999'),;
trans(aProdtch[pFaobRW:nat,3],mascara(8,.f.)),;
trans(aProdtch[pFaobRW:nat,5],mascara(8,.f.)),;
trans(aProdtch[pFaobRW:nat,7],'999'),;
if(aProdtch[pFaobRW:nat,18]>0,strzero(aProdutos[pFaobRW:nat,18],2),"N"),;
if(cMod=="M",TRANS( VAL( SUBSTR( STRZERO(aprodutos[pfaobRW:nat,19],4),1,3)),"9999")+if(right(STRZERO(aprodutos[pfaobRW:nat,19],4),1)=="9"," B"," L"),""),;
if(lContrRestPct .and. cMod#"D","",trans(aProdtch[pFaobRW:nat,9],'9999.999'))})}

pFaobRW:setArray(aProdtch)
pFaobRW:Refresh()

**

REDEFINE SBUTTON obtc[1] ID 4017 OF oDlg2 RESOURCE "YES" ACTION(aProdutos:=aProdtch,FATURARMESATC(oDlg1,cMod,@lfatesai,@lfaturado,aProdutos,nPedido,cCliente,cCGCCPF,aMesa,diskfone,diskclie,nFWHPROXSENHA,lvendabal,@lvbcontinua),;
IF(lvbcontinua,(fwclearfornew(tcobRW1,pFaobRW,@aMesa,@aProdtch,@npedido,@nAGRmesa,@nAGRcvend,@vprod,@nTotEntra,@nTotProSE,@vtsay,@nTtPagar,@lpsair,@lfatesai,@lfaturado),MostraTotalTC(aProdtch,@nTtPagar,nPedido,aMesa,vtsay,otsay,cMod,lvendabal),oTabs:SetOption(1),oTabs:refresh(),obRW2:SETFOCUS()),(aProdtch:=aProdutos,pFaobRW:setfocus()))) CANCEL TEXT ON_BOTTOM
REDEFINE SBUTTON obtc[2] ID 4014 OF oDlg2 RESOURCE "OF1" ACTION(aProdutos:=aProdtch,EXCPRODUTO(pFaobRW:nat,@aProdutos,@aMesa),aProdtch:=aProdutos ,pFaobRW:setfocus()) CANCEL TEXT ON_BOTTOM
REDEFINE SBUTTON obtc[3] ID 4015 OF oDlg2 RESOURCE "PRINT" ACTION(EXTRATOMESATC(cmod,aProdutos,nPedido,cCliente,cCGCCPF,aMesa,diskfone,diskclie,@lfatesai,lvendabal) ,pFaobRW:setfocus()) CANCEL TEXT ON_BOTTOM
REDEFINE SBUTTON obtc[4] PROMPT if(cMod=="M","Trocar mesa","Trocar") ID 4016 OF oDlg2 RESOURCE "UNDO" ACTION(if(cMod == 'M',TROCARMESA(pFaobRW,oWndChild,cMod,@aProdtch,@aMesa,@nAGRmesa),) ,pFaobRW:setfocus()) CANCEL TEXT ON_BOTTOM
REDEFINE SBUTTON obtc[5] ID 4018 OF oDlg2 RESOURCE "PAGAMENTO" ACTION(pagamentoparcialtc(@aProdtch,@nTtPagar,nPedido,@aMesa,vtsay,otsay,cMod,diskfone,diskclie,,lvendabal),pFaobRW:setArray(aProdtch),pFaobRW:Refresh() ,pFaobRW:setfocus()) CANCEL TEXT ON_BOTTOM
REDEFINE SBUTTON obtc[6] ID 4019 OF oDlg2 RESOURCE "USERS" ACTION(aProdutos:=aProdtch,agrupar_mesa(arqpar->filbase98, @aProdutos, nPedido, cMod, @aMesa, cDescTipo),aProdtch:=aProdutos,MostraTotalTC(aProdtch,@nTtPagar,nPedido,aMesa,vtsay,otsay,cMod,lvendabal),pFaobRW:setArray(aProdtch),pFaobRW:Refresh(),tcobRW1:setArray(aProdtch),tcobRW1:Refresh(),pFaobRW:setfocus()) CANCEL TEXT ON_BOTTOM
REDEFINE SBUTTON obtc[7] ID 4009 OF oDlg2 RESOURCE "QUIT" ACTION(oTabs:SetOption(1),oTabs:refresh(),obRW2:setfocus()) CANCEL TEXT ON_BOTTOM
REDEFINE SBUTTON obtc[8] ID 4002 OF oDlg2 RESOURCE "EDIT2" ACTION(aProdutos:=aProdtch, TouchComp(cMod,pFaobRW,@aMesa,@aProdutos,lvendabal),aProdtch:=aProdutos,MostraTotalTC(aProdtch,@nTtPagar,nPedido,aMesa,vtsay,otsay,cMod,lvendabal),pFaobRW:setfocus(),tcobRW1:Refresh(),tcobRW1:gobottom()) CANCEL TEXT ON_BOTTOM

for x:=1 to len(obtc)
obtc[x]:nshape :=nStyleBut
obtc[x]:nClrFore:=FWHTCHBUTTEXT
obtc[x]:nClrBack:=FWHTCHBUTFUNDO
obtc[x]:nClrBord:=CLR_WHITE
next

redefine say id 5222 of oDlg2
redefine say id 5223 of oDlg2
redefine say id 5224 of oDlg2
redefine say id 5225 of oDlg2

redefine say otsay[1] var vtsay[1] id 4005 of oDlg2 color CLR_HBLUE PICTURE '@E 999,999.99'
redefine say otsay[2] var vtsay[2] id 4006 of oDlg2 color CLR_HBLUE PICTURE '@E 999,999.99'
redefine say otsay[3] var vtsay[3] id 4007 of oDlg2 color CLR_HBLUE PICTURE '@E 999,999.99'
redefine say otsay[4] var vtsay[4] id 4008 of oDlg2 color CLR_HRED PICTURE '@E 999,999.99'


ACTIVATE DIALOG oDlg2 NOWAIT ON INIT (oDlg2:Move( 0, 0 ),if(cMod=="C",(obtc[4]:disable(),obtc[6]:disable()),),MostraTotalTC(aProdtch,@nTtPagar,nPedido,aMesa,vtsay,otsay,cMod,lvendabal),pFaobRW:setfocus(),IF(cMod=="D",(obtc[4]:disable(),obtc[5]:disable(),obtc[6]:disable()),));
VALID(IF(oWndChild==NIL,.T.,.F.))

oDlg2:Hide()
oDlg1:SetFocus()
aDlgs :={ oDlg1, oDlg2 }
oWndChild:bkeydown:={|nkey| if(nkey==VK_ESCAPE,obRW2:SETFOCUS(),)}

ACTIVATE WINDOW oWndChild maximized on init( oFlashTime2 := FlashWndTimer( oWndChild ,, {|| IsIconic( oWndChild:hWnd ) } ));
valid( if(FWHCONTROLSENHAS(nFWHPROXSENHA,aProdtch,obRW2,lfaturado,lvendabal,@lpsair),;
(oWndChild:=NIL,oFlashTime2:end(),oTabs:end(),ocurfot:end(),fonte_TCB:end(),fonte_TCS:end(),fonte_TC2:end(),fonte_TCH:END(),IF(pega_parametro('USAMOUSETOUCHSCR','C',1)=="S",Religa_Rato(),),;
controlgravatouch(aProdtch,lfatesai,lGrava,lAchou,nPedido,aMesa,cCliente,cCGCCPF,cMod,diskfone,diskclie,lvendabal),.t.),.f.))

RETURN(.T.)
ubiratanmga@gmail.com

FWH24.04
BCC7.3
HARBOUR3.2
xMate
Pelles´C
TDolphin
MGA
 
Posts: 1254
Joined: Mon Feb 25, 2008 2:54 pm
Location: Brasil/PR/Maringá

Postby mmercado » Mon Apr 07, 2008 7:31 pm

SGS wrote:obRW2:bKeyDown := {|nKey| if(FWTECLASEDITAVEIS(nkey),(oprod:setfocus(),keybd_event(nKey,,,0)),Nil),;
if(nKey==VK_ESCAPE,oWndChild:end(),NIL)}

Trata con esto:
Code: Select all  Expand view  RUN
obRW2:bKeyDown := {|nKey| if(FWTECLASEDITAVEIS(nkey), (oprod:setfocus(), keybd_event(nKey,,,0)),Nil),;
if(nKey==VK_ESCAPE, ( oWndChild:end(), oWndChild := Nil ), NIL ) }

Saludos.

Manuel Mercado
User avatar
mmercado
 
Posts: 782
Joined: Wed Dec 19, 2007 7:50 am
Location: Salamanca, Gto., México

Postby MGA » Tue Apr 08, 2008 12:52 pm

Sr. Manuel, acontece que com o ESC (VK_ESCAPE) não chega nem a entrar no BKEYDOWN

ESC

obrw:bkeydown:={| nkey | msginfo("ENTROU") } <- NÃO ENTRA

Fiz a seguinte alteração na classe, para resolver temporariamente o problema:

METHOD GetDlgCode( nLastKey ) CLASS TSBrowse

// This method is very similar to TControl:GetDlgCode() but it is
// necessary to have WHEN working

If ! ::oWnd:lValidating
If nLastKey == VK_UP .or. nLastKey == VK_DOWN ;
.or. nLastKey == VK_RETURN .or. nLastKey == VK_TAB
::oWnd:nLastKey := nLastKey
Else
::oWnd:nLastKey := 0
EndIf
EndIf
if nLastKey==VK_ESCAPE .and. oWndChild#NIL // Para ESC funcionar TOUCH SCREEN :(
oWndChild:end()
endif

Return If( IsWindowEnabled( ::hWnd ) .and. nLastKey != VK_ESCAPE, ;
DLGC_WANTALLKEYS, 0 )



Pode comentar esta alteração Sr. Manuel.

Gracias e Parabéns pelo belo trabalho.
ubiratanmga@gmail.com

FWH24.04
BCC7.3
HARBOUR3.2
xMate
Pelles´C
TDolphin
MGA
 
Posts: 1254
Joined: Mon Feb 25, 2008 2:54 pm
Location: Brasil/PR/Maringá

Postby mmercado » Tue Apr 08, 2008 3:12 pm

SGS wrote:acontece que com o ESC (VK_ESCAPE) não chega nem a entrar no BKEYDOWN

Tienes razón, vamos a modificar TSBrowse, ésto estará incluído en la próxima versión pero mientras puedes agregarlo en TSBrowse.prg.

1.- En la declaración de DATA, agrega esta línea
Code: Select all  Expand view  RUN
   DATA   bOnEscape                                  // to do something when browse ends through escape key

Y cambia el método GetDlgCode para que quede así:
Code: Select all  Expand view  RUN
METHOD GetDlgCode( nLastKey ) CLASS TSBrowse

   If nLastKey == VK_ESCAPE .and. ::bOnEscape != Nil
      Eval( ::bOnEscape, Self )
   EndIf

   If ! ::oWnd:lValidating
      If nLastKey == VK_UP .or. nLastKey == VK_DOWN .or. nLastKey == VK_RETURN .or. nLastKey == VK_TAB .or. ;
         nLastKey == VK_ESCAPE
         
         ::oWnd:nLastKey := nLastKey
      Else
         ::oWnd:nLastKey := 0
      EndIf
   EndIf


Return If( IsWindowEnabled( ::hWnd ) .and. nLastKey != VK_ESCAPE, DLGC_WANTALLKEYS, 0 )

Así podrás hacer lo que quieres con oBrw:bOnEscape :=¨{||oChild.....etc

Un abrazo

Manuel Mercado
User avatar
mmercado
 
Posts: 782
Joined: Wed Dec 19, 2007 7:50 am
Location: Salamanca, Gto., México

Postby MGA » Tue Apr 08, 2008 8:42 pm

Gracias Sr.Manuel, funcionou perfeitamente...

Sigo muito feliz com TSBROWSE e TSBUTTON... :D
ubiratanmga@gmail.com

FWH24.04
BCC7.3
HARBOUR3.2
xMate
Pelles´C
TDolphin
MGA
 
Posts: 1254
Joined: Mon Feb 25, 2008 2:54 pm
Location: Brasil/PR/Maringá


Return to FiveWin para Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 45 guests

cron