Saludos
GABO

Amigo primero que todo excelente trabajo.. de verdad que se ve espectacular. Felicitaciobes
Segundo que todo me gustaria saber como hiciste los botones sobre todo los verdes de la derecha. Excelente dise帽o.
Leandro
Los controles de la pantalla son xBrowse, ButtonBmp y Todos los botones de la derecha son TsButton de manuel mercado.. la clase te permite pintar los botones con aparencia degradada tanto cuando tiene el foco y aun no teniendolo..
gracias por tu comentario.. la pantalla es el modulo principal de captura, pero depues esta la entrada de datos por teclado virtual.. y muchas opciones mas
saludos
GABO
gabo wrote:espero que ahora si funcione
Saludos
Dear GAbo,
Can YOU release a sample source code of this ?
Regards
Esta muy bien....
Una sola pregunta: 驴Que tiene "traspaso" como prop贸sito? 驴Que hace esta opcion/bot贸n?
jllinas wrote:Esta muy bien....
Una sola pregunta: 驴Que tiene "traspaso" como prop贸sito? 驴Que hace esta opcion/bot贸n?
DEFINE DIALOG oDlgMesas RESOURCE "DLG_PRODUCTOSCOMANDERO" OF oApp:oWndMain;
TITLE "MESA: " + aDatosMesa[1] + " " + aDatosMesa[3]
REDEFINE BUTTONBMP aBtnsConsu[1] ID 600 OF oDlgMesas BITMAP "BMP_NUEVACOMANDA";
PROMPT "&Agregar" TEXTBOTTOM
REDEFINE BUTTONBMP aBtnsConsu[2] ID 605 OF oDlgMesas BITMAP "BMP_MASUNO";
ACTION OnActionMasUno(oBrwConsu, oSaysGet) ;
PROMPT "(+) Uno"+CRLF+" " TEXTBOTTOM
.
.
.
// Botones de lineas ----------------------------
REDEFINE SBUTTON aBtnsLines[ 1] ID 900 OF oDlgMesas
.
.
// Botones de productos por lineas ----------------------------
REDEFINE SBUTTON aBtnsProdu[ 1] ID 914 OF oDlgMesas
REDEFINE SBUTTON aBtnsProdu[ 2] ID 915 OF oDlgMesas
REDEFINE SBUTTON aBtnsProdu[ 3] ID 916 OF oDlgMesas
.
.
.
// carga los botones de las lineas
FOR EACH oBtn IN aBtnsLines
IF hb_EnumIndex() <= Len( aLineas )
oBtn:cCaption:= Str2Lines( AllTrim( aLineas[ hb_EnumIndex(), 1 ] ), " " )
//Str2Lines( AllTrim(produc->DESC1), " " )
oBtn:nClrText:= { |oB| If( oB:lMouseOver, CLR_WHITE, CLR_RED ) }
oBtn:nClrBack:= { |oB| If( oB:lMouseOver, { nRgb(0,119,176), nRgb(255,255,255), 1 }, ;
{ nRgb(128,128,255), nRgb(255,255,255), 1 } ) }
oBtn:cargo := { .F., aLineas[hb_EnumIndex(), 3] }
oBtn:bAction := { || AEVAL( aBtnsLines, ;
{ |oB| IF( oB:lEverPress, (oB:lEverPress:= .F., oB:cargo[1]:= .F.,;
oB:nClrBack:= { nRgb(128,128,255), nRgb(255,255,255), 1 },oB:refresh() ), .F. ) } ), ;
oBtn:cargo[1]:= !oBtn:cargo[1], ;
If( oBtn:cargo[1], ;
( oBtn:lEverPress := .T., ;
oBtn:nClrBack:= { nRgb(0,119,176 ), nRgb(255,255,255), 5 }, ;
GetProductoPorLinea( oBtn:cargo[2], aBtnsProdu, oBrwConsu, aBtnScroll, ;
oSaysGet, oFntBrow ) ) , ;
( oBtn:lEverPress := .F., oBtn:cargo[2]:= " ",;
oBtn:nClrBack:= { nRgb(128,128,255), nRgb(255,255,255), 1 } ) ), ;
oBtn:refresh() }
oBtn:oFont:= oFntSays
oBtn:Refresh()
ELSE
oBtn:disable()
ENDIF
NEXT
// Botones de scroll de lineas y productos por lineas
REDEFINE BUTTONBMP aBtnScroll[1] ID 912 OF oDlgMesas BITMAP "BMP_UP_BTN";
ACTION OnActionUpLines( @aBtnsLines, aLineas, aCargos, aBtnScroll, oBrwConsu, aBtnsProdu )
REDEFINE BUTTONBMP aBtnScroll[2] ID 913 OF oDlgMesas BITMAP "BMP_DOWN_BTN";
ACTION OnActionDownLines( @aBtnsLines, aLineas, aCargos, aBtnScroll, oBrwConsu, aBtnsProdu )
REDEFINE BUTTONBMP aBtnScroll[3] ID 938 OF oDlgMesas BITMAP "BMP_UP_BTN";
ACTION OnActionUpProducto( aBtnsProdu, aBtnScroll )
REDEFINE BUTTONBMP aBtnScroll[4] ID 939 OF oDlgMesas BITMAP "BMP_DOWN_BTN";
ACTION OnActionDownProducto( aBtnsProdu, aBtnScroll )
REDEFINE BUTTONBMP oBtnExit ID 549 OF oDlgMesas BITMAP "BMP_SALIRTPV" ;
PROMPT "S" + CRLF + "a" + CRLF + "l" + CRLF + "i" + CRLF + "r"+CRLF + " ";
ACTION ( lSalida:= TRUE, oDlgMesas:End() );
TEXTBOTTOM
WITH OBJECT oBrwConsu:= TXBrowse():New( oDlgMesas )
:nHeaderHeight := 25
:nRowHeight := 35
:nMarqueeStyle := MARQSTYLE_HIGHLROW
:nColDividerStyle := LINESTYLE_LIGHTGRAY
:nRowDividerStyle := LINESTYLE_LIGHTGRAY
:lColDividerComplete := .T.
:lHScroll := .T.
:lVScroll := .T.
// :oFont := oFntBrow
:bChange:= {|| oSaysGet[6]:SetText( RTRIM( consum->NOTA1 ) + " " + RTRIM(consum->NOTA2) ), ;
oSaysGet[6]:refresh() }
END
WITH OBJECT oCol := oBrwConsu:AddCol()
:bStrData := { || TRANSFORM( consum->CANTIDAD, "999,999" ) }
:cHeader := "Cantidad"
:nDataStrAlign:= AL_RIGHT
:nWidth := 40
:cHeader := "Canti"
:oHeaderFont:= oFntHead
:oDataFont := oFntBrow
END
WITH OBJECT oCol := oBrwConsu:AddCol()
:bStrData := { || HB_OemToAnsi(consum->NOMB_PROD) }
:nWidth := 200
:cHeader := "Nombre del producto"
:oHeaderFont:= oFntHead
:oDataFont := oFntBrow
END
.
.
.
oBrwConsu:SetRDD()
oBrwConsu:CreateFromResource(550)
REDEFINE GSAY oSaysGet[1] VAR aVars[1] ID 750 OF oDlgMesas PICTURE '99,999,999' ;
.
.
.
ACTIVATE DIALOG oDlgMesas ;
ON INIT ( OnInitProductos( @aVars, @aConsumo ), oBrwConsu:SetFocus() ) ;
ON PAINT DrawBitmap( oDlgMesas:hDC, oBmpFondo:hBitmap, 0, 0, oBmpFondo:nWidth(), ;
oBmpFondo:nHeight(), aBtnsConsu[1]:disable(), aBtnsConsu[1]:hide(), ;
aBtnsConsu[1]:refresh(), aBtnsConsu[8]:disable(), aBtnsConsu[8]:hide(), aBtnsConsu[8]:refresh());
CENTERED VALID ( oFntSays:End(), oFntGets:End(), oFntBrow:End(), ;
oFntTota:End(), DestroyBtns( aBtnsLines ), ;
DestroyBtns( aBtnScroll ), DestroyBtns( aBtnsProdu ), nPageLines:= 0, ;
nElemenLines:= 12, consum->( ORDSCOPE( 0, NIL ) ), ;
consum->( ORDSCOPE( 1, NIL ) ), lSalida )GOOD ...Mr Gabo
can I see the Str2Lines() function ?
REGARDS
Hi, silvio
the function Str2Lines() it is an adaptation the function Str2a() the what32. the function Str2Lines() returns a string with character CRLF in the place the character Space
example:
a:= Str2Lines("Hi silvio is a example")
? a
Hi
Silvio
is
a
example
Regards
GABO
I have a problem :
I created a coffee touch screen bar
I can to set ( configuration) each button on product but when I inset the description on a button it run bad because I founding a function to divide the strings
example
cod :=1
desc:="Prosciutto cotto con formaggio e pomodoro"
I wanted insert on a button
"Prosciutto cotto"
"con formaggio"
"e pomodoro"
Have you an idea ?
Silvio,
my mail is gornelas at prodigy.net.mx
Regards
GABO