Ya he probado cambiando todo lo que se me ha ocurrido en el .rc pero no consigo hacerlo. ¿Alguien podria indicarme como tendría que hacerlo? . Gracias.
- Code: Select all Expand view
- DEFINE DIALOG oDlgdatos RESOURCE "RECIBO_2" TITLE "Seleccionar Facturas" of oApp:oWndMain
REDEFINE BROWSE oBrwdatos ID 101 of oDlgdatos
obrwdatos:bldblclick = { | nKey, nFlags | iif((cremesa)->slc="X",;
((cremesa)->slc:=" ",vnrecibo:=vnrecibo-1,gvnrecibo:Refresh(),;
vtimporte:=vtimporte-(cremesa)->total,gvtimporte:Refresh()),;
((cremesa)->slc:="X",vnrecibo:=vnrecibo+1,gvnrecibo:Refresh(),;
vtimporte:=vtimporte+(cremesa)->total,gvtimporte:Refresh())),obrwdatos:refresh()}
ADD COLUMN to oBrwdatos DATA (cremesa)->slc HEADER "Slc" size 50
ADD COLUMN to oBrwdatos DATA (cremesa)->numero HEADER "Numero" size 75 ORDER "NUMERO"
ADD COLUMN to oBrwdatos DATA (cremesa)->fecha HEADER "Fecha" size 75
ADD COLUMN to oBrwdatos DATA alltrim((cremesa)->nombre) HEADER "Nombre" size 400 ORDER "NOMBRE"
ADD COLUMN to oBrwdatos DATA (cremesa)->total HEADER "Total" size 100 picture "9,999,999.99" right
REDEFINE GET gvfcreacion Var vfcreacion ID 104 OF oDlgdatos
REDEFINE GET gvfcargo Var vfcargo ID 105 OF oDlgdatos VALID IIF(vfcargo>=vfcreacion,.t.,.f.)
REDEFINE GET gvtimporte Var vtimporte picture "9,999,999.99" ID 102 OF oDlgdatos when vlsay
REDEFINE GET gvnrecibo Var vnrecibo picture "9,999" ID 103 OF oDlgdatos when vlsay
REDEFINE BTNBMP aBoton[1] ID 501 PROMPT oemtoansi("A¥ADIR") OF oDlgdatos ;
action (anadir(),obrwdatos:gotop(),obrwdatos:refresh());
MESSAGE Oemtoansi("A¤adir Facturas")
REDEFINE BTNBMP aBoton[4] ID 502 PROMPT "BORRAR" OF oDlgdatos;
MESSAGE "Borrar Linea";
action (borrar(),obrwdatos:gotop(),obrwdatos:refresh())
REDEFINE BTNBMP aBoton[2] ID 503 PROMPT "IMPRIMIR" OF oDlgdatos;
ACTION imprimirremesa(oDlgdatos);
MESSAGE "Imprimir Remesa"
REDEFINE BTNBMP aBoton[3] ID 504 PROMPT "GENERAR" OF oDlgdatos;
MESSAGE "Generar Remesa";
action (generarremesa())
ACTIVATE DIALOG oDlgdatos CENTER ON INIT (oBrwdatos:SetOrder(4),oBrwdatos:gotop())
Definicion en el .rc
- Code: Select all Expand view
- RECIBO_2 DIALOG 210, 42, 585, 354
STYLE WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU | WS_MINIMIZEBOX
CAPTION "Selecciona"
FONT 10, "Arial"
{
LISTBOX 101, 10, 4, 561, 287, LBS_NOTIFY | WS_BORDER | LBS_SORT | LBS_USETABSTOPS | LBS_DISABLENOSCROLL | WS_BORDER | WS_TABSTOP
CONTROL "", 501, "TbtnBmp", 0 | WS_CHILD | WS_VISIBLE, 55, 299, 50, 14
CONTROL "", 503, "TbtnBmp", 0 | WS_CHILD | WS_VISIBLE, 115, 299, 50, 14
CONTROL "", 502, "TbtnBmp", 0 | WS_CHILD | WS_VISIBLE, 56, 318, 50, 14
CONTROL "", 504, "TbtnBmp", 0 | WS_CHILD | WS_VISIBLE, 116, 317, 50, 14
LTEXT "Total", -1, 476, 311, 19, 8
EDITTEXT 102, 497, 309, 69, 12, ES_RIGHT | WS_BORDER | WS_TABSTOP
LTEXT "N\xBA Recibos", -1, 491, 332, 40, 8
EDITTEXT 103, 536, 330, 30, 12, ES_RIGHT | WS_BORDER | WS_TABSTOP
LTEXT "Fecha Creacion", -1, 210, 302, 53, 8
LTEXT "Fecha Cargo", -1, 213, 323, 44, 8
EDITTEXT 104, 274, 301, 69, 12, ES_RIGHT | WS_BORDER | WS_TABSTOP
EDITTEXT 105, 274, 320, 69, 12, ES_RIGHT | WS_BORDER | WS_TABSTOP
}