- Code: Select all Expand view
METHOD GetDlgCode( nLastKey ) CLASS TGet
.....
return nil // DLGC_WANTALLKEYS -> con este cambio funciona perfectamente .
Aqui queda por si alguien tiene el mismo problema .
Código que reproduce el problema . para ello ir al menu mdi -> en el xbrowse ->intro -> en el dlg que sale intro . Observar el parpadeo de la ventana mdiChild.
- Code: Select all Expand view
// Working with MDI enviroments
#include "FiveWin.ch"
#include "xbrowse.ch"
REQUEST DBFCDX
static oWnd
//----------------------------------------------------------------------------//
function Main()
local oWndEdit, oBar, oIcon, oImage
local cName := "FiveWin power"
USE Clientes NEW SHARED VIA "DBFCDX"
DEFINE ICON oIcon RESOURCE "test"
DEFINE WINDOW oWnd FROM 1, 1 TO 20, 70 TITLE "I am the MDI Frame" ;
MDI ;
ICON oIcon
SET MESSAGE OF oWnd TO "Main Window"
DEFINE BUTTONBAR oBar 2007 OF ownd
DEFINE BUTTON OF oBar GROUP ;
PROMPT "mdi" TOOLTIP "lanzar mdichild" ;
ACTION CreaMdiChild()
DEFINE BUTTON OF oBar GROUP ;
PROMPT "info" TOOLTIP "lanzar msginfo" ;
ACTION Msginfo("hola")
ACTIVATE WINDOW oWnd MAXIMIZED ;
VALID MsgYesNo( "Want to End ?" )
return nil
//----------------------------------------------------------------------------//
Function CreaMdiChild()
local oChild, oBrw
DEFINE WINDOW oChild TITLE "Basic Cell selector browse" MDICHILD OF oWnd
DEFINE BUTTONBAR oBar 2007 OF oChild
@ 0,0 XBROWSE oBrw OF oChild ALIAS Alias() AUTOCOLS
obrw:bKeyDown := { | nKey |dlgmas() }
oBrw:CreateFromCode()
oBrw:cToolTip = "This is a test"
oChild:oClient := oBrw
oBrw:SetFocus()
RETURN NIL
function dlgmas()
local oDlg, oBtn1, oBtn2, oGet1, cGet1 := 0
local oFontDlg
local oBrush
DEFINE BRUSH oBrush COLOR RGB( 240, 240, 240 )
DEFINE FONT oFontDlg NAME 'Ms Sans Serif' SIZE 0,-12
DEFINE DIALOG oDlg TITLE "Dialog designer" ;
FROM 354, 382 TO 540, 709 PIXEL FONT oFontDlg ;
BRUSH oBrush
@ 60, 32 BUTTON oBtn1 PROMPT "&Ok" ;
SIZE 40, 12 PIXEL OF oDlg ;
ACTION MsgInfo( "Not defined yet!" )
@ 60, 88 BUTTON oBtn2 PROMPT "&Cancel" ;
SIZE 40, 12 PIXEL OF oDlg ;
ACTION MsgInfo( "Not defined yet!" )
@ 24, 28 GET oGet1 VAR cGet1 SIZE 68, 12 PIXEL OF oDlg PICTURE "99" ;
VALID ( if (cGet1 == 0 , oDlg:End(),) )
ACTIVATE DIALOG oDlg ON INIT oget1:setfocus()
Return nil