Tengo el siguiente problema con dialog nomodal
si presiona la tecla ESC este se sale sin validar, y me deja las bases abiertas
Como evitar presionar la tecla ESC que se cierre el dialogo
he colocado al inicio del programa SetDialogEsc( .F. )
- Code: Select all Expand view
- lEsc := .f.
REDEFINE BUTTONBMP ID 104 OF oDlg ;
ACTION ( lEsc := .t., oDlg:End() ) ;
UPDATE PROMPT "&Salir" ;
BITMAP "btn_salir" ;
TEXTRIGHT
ACTIVATE DIALOG oDlg CENTER ;
VALID ( lEsc .and. ;
(aEval( oBrw, { |x| x:Disable(), x:cAlias := "" } ), oDlg:Disable(), ;
(alias_marcas)->( dbCloseArea() ), ;
oTdbf:Close(),;
oTdbf2:Close()),;
oMenuItem:Enable(), .t. ) NOMODAL
Adjunto el recurso..
- Code: Select all Expand view
- REPORTE_COTIZA DIALOG FIXED IMPURE 31, -13, 529, 353
STYLE WS_POPUP|WS_CAPTION|WS_VISIBLE
CAPTION "Reporte Cotizaciones"
FONT 8, "MS Sans Serif"
BEGIN
CONTROL "Fec.Emisión", 21, "Button", BS_AUTOCHECKBOX|BS_LEFTTEXT|WS_TABSTOP, 20, 20, 52, 12
CONTROL "", 22, "Edit", WS_VSCROLL|WS_BORDER|WS_TABSTOP, 76, 20, 56, 12
CONTROL "", 23, "Edit", WS_VSCROLL|WS_BORDER|WS_TABSTOP, 140, 20, 60, 12
CONTROL "Rut Cliente", 24, "Button", BS_AUTOCHECKBOX|BS_LEFT|BS_VCENTER|BS_LEFTTEXT|WS_TABSTOP, 20, 36, 52, 12
CONTROL "", 25, "Edit", WS_BORDER|WS_TABSTOP, 76, 36, 56, 12
CONTROL "", 26, "Edit", WS_BORDER|WS_TABSTOP, 140, 36, 72, 12
CONTROL "", 27, "ComboBox", WS_BORDER|CBS_DROPDOWNLIST|WS_TABSTOP, 280, 20, 93, 72
CONTROL "", 28, "ComboBox", WS_BORDER|CBS_DROPDOWNLIST|WS_TABSTOP, 280, 36, 93, 89
CONTROL "", 29, "ComboBox", WS_BORDER|CBS_DROPDOWNLIST|WS_TABSTOP, 280, 52, 93, 89
CONTROL "", 117, "Button", BS_GROUPBOX, 220, 4, 164, 64
CONTROL "Sucursal:", 301, "Static", SS_CENTERIMAGE|WS_GROUP, 228, 20, 44, 12
CONTROL "Marca", 302, "Static", SS_CENTERIMAGE|WS_GROUP, 228, 36, 44, 12
CONTROL "&Consultar", 102, "Button", WS_TABSTOP, 412, 12, 64, 16
CONTROL "&Imprimir", 103, "Button", WS_TABSTOP, 412, 28, 64, 16
CONTROL "&Salir", 104, "Button", WS_TABSTOP, 412, 44, 64, 16
CONTROL "", 100, "TSBrowse", WS_TABSTOP|0x00b00000, 12, 72, 508, 276
CONTROL "Rango Fechas (optativo)", 110, "Button", BS_GROUPBOX, 12, 4, 204, 64
CONTROL "", 122, "Button", BS_GROUPBOX, 392, 4, 121, 64
CONTROL "Vendedor", 303, "Static", SS_CENTERIMAGE|WS_GROUP, 228, 52, 44, 12
END