#include "fivewin.ch"
static aStr[ 5 ]
//----------------------------------------------------------------------------//
function Main()
local oWnd, oBar, oFont
FW_SetUnicode( .T. )
SetGetColorFocus()
AEval( aStr, { |u,i| aStr[ i ] := Space( 25 ) } )
DEFINE FONT oFont NAME "Segoe UI" SIZE 0,-18
DEFINE WINDOW oWnd MDI TITLE "UNICODE GETS"
DEFINE BUTTONBAR oBar SIZE 80,60 2007
DEFINE BUTTON OF oBar PROMPT "MDI" + CRLF + "Child" CENTER ACTION ChildWindow()
DEFINE BUTTON OF oBar PROMPT "Modal" + CRLF + "Dialog" CENTER ACTION NewDialog( .T. )
DEFINE BUTTON OF oBar PROMPT "Nonmodal" + CRLF + "Dialog" CENTER ACTION NewDialog()
oWnd:SetFont( oFont )
ACTIVATE WINDOW oWnd
RELEASE FONT oFont
return nil
//----------------------------------------------------------------------------//
static function ChildWindow()
local oWnd
DEFINE WINDOW oWnd MDICHILD OF WndMain() COLOR CLR_BLACK, CLR_WHITE
CreateGets( oWnd )
oWnd:bGotFocus := { || oWnd:Update() }
ACTIVATE WINDOW oWnd
return nil
//----------------------------------------------------------------------------//
static function NewDialog( lModal )
local oDlg
DEFAULT lModal := .f.
DEFINE DIALOG oDlg SIZE 460, 260 PIXEL TRUEPIXEL FONT WndMain():oFont
CreateGets( oDlg )
oDlg:bGotFocus := { || oDlg:Update() }
if lModal
ACTIVATE DIALOG oDlg CENTERED
else
ACTIVATE DIALOG oDlg CENTERED NOMODAL
endif
return nil
//----------------------------------------------------------------------------//
static function CreateGets( oWnd )
local nRow := 60
@ nRow, 30 GET aStr[ 1 ] SIZE 400,32 PIXEL OF oWnd CHRGROUP CHR_WIDE UPDATE
nRow += 35
@ nRow, 30 GET aStr[ 2 ] SIZE 400,32 PIXEL OF oWnd CHRGROUP CHR_WIDE UPDATE
nRow += 35
@ nRow, 30 GET aStr[ 3 ] SIZE 400,32 PIXEL OF oWnd CHRGROUP CHR_WIDE UPDATE
nRow += 35
@ nRow, 30 GET aStr[ 4 ] SIZE 400,32 PIXEL OF oWnd CHRGROUP CHR_WIDE UPDATE
return nil
//----------------------------------------------------------------------------//
#include "fivewin.ch"
static aStr[ 4 ]
//----------------------------------------------------------------------------//
function Main()
local oWnd, oBar, oFont
FW_SetUnicode( .T. )
SetGetColorFocus()
AEval( aStr, { |u,i| aStr[ i ] := Space( 25 ) } )
DEFINE FONT oFont NAME "Segoe UI" SIZE 0,-18
DEFINE WINDOW oWnd MDI TITLE "UNICODE GETS"
DEFINE BUTTONBAR oBar SIZE 80,60 2007
DEFINE BUTTON OF oBar PROMPT "MDI" + CRLF + "Child" CENTER ACTION ChildWindow()
DEFINE BUTTON OF oBar PROMPT "Nonmodal" + CRLF + "Dialog" CENTER ACTION NewDialog()
DEFINE BUTTON OF oBar PROMPT "Modal" + CRLF + "Dialog" CENTER ACTION NewDialog( .t. )
oWnd:SetFont( oFont )
ACTIVATE WINDOW oWnd
RELEASE FONT oFont
return nil
//----------------------------------------------------------------------------//
static function ChildWindow()
local oWnd
DEFINE WINDOW oWnd MDICHILD OF WndMain() TITLE "MDI CHILD WINDOW" COLOR CLR_BLACK, CLR_WHITE
CreateGets( oWnd )
oWnd:bGotFocus := { || oWnd:Update() }
ACTIVATE WINDOW oWnd
return nil
//----------------------------------------------------------------------------//
static function NewDialog( lModal )
local oDlg
DEFAULT lModal := .f.
DEFINE DIALOG oDlg SIZE 460, 260 PIXEL TRUEPIXEL FONT WndMain():oFont ;
TITLE If( lModal, "MODAL DIALOG", "NON-MODAL DIALOG" )
oDlg:bGotFocus := { || oDlg:Update() }
if lModal
CreateGets( oDlg )
ACTIVATE DIALOG oDlg CENTERED
else
ACTIVATE DIALOG oDlg CENTERED NOMODAL ON INIT CreateGets( oDlg )
endif
return nil
//----------------------------------------------------------------------------//
static function CreateGets( oWnd )
local nRow
nRow := 60
@ nRow, 30 GET aStr[ 1 ] SIZE 400,32 PIXEL OF oWnd CHRGROUP CHR_WIDE UPDATE
nRow += 35
@ nRow, 30 GET aStr[ 2 ] SIZE 400,32 PIXEL OF oWnd CHRGROUP CHR_WIDE UPDATE
nRow += 35
@ nRow, 30 GET aStr[ 3 ] SIZE 400,32 PIXEL OF oWnd CHRGROUP CHR_WIDE UPDATE
nRow += 35
@ nRow, 30 GET aStr[ 4 ] SIZE 400,32 PIXEL OF oWnd CHRGROUP CHR_WIDE UPDATE
return nil
//----------------------------------------------------------------------------//
REDEFINE GET ::oEX_WHO VAR ::cEX_WHO ID 101 OF ::oDlg UPDATE CHRGROUP CHR_WIDE
ACTIVATE DIALOG ::oDlg CENTER
DEFINE WINDOW go31001Wnd FROM 0, 0 TO 0, 0
...
DEFINE DIALOG ::oDlg RESOURCE ::cResName FONT oFont BRUSH oBrush TRANSPARENT OF go31001Wnd
REDEFINE GET ::oEX_WHO VAR ::cEX_WHO ID 101 OF ::oDlg UPDATE CHRGROUP CHR_WIDE
ACTIVATE DIALOG ::oDlg NOWAIT
go31001Wnd:bGotFocus := { || go31001Wnd:Update() }
ACTIVATE WINDOW go31001Wnd CENTER
DEFINE DIALOG ....
// Define Gets and other controls
ACTIVATE DIALOG oDlg AS MDICHILD
nageswaragunupudi wrote:Can you please try
- Code: Select all Expand view RUN
DEFINE DIALOG ....
// Define Gets and other controls
ACTIVATE DIALOG oDlg AS MDICHILD
ACTIVATE DIALOG ::oDlg AS MDICHILD ;
ON INIT ( oThis:oDlg:Move(0,0) ) ;
VALID !paOpenWnd[IS_WSE31002]
nageswaragunupudi wrote:Please reproduce the error.log.
Do you have the problem in mdi-dialog only or in normal dialogs also?
ACTIVATE DIALOG ::oDlg NOWAIT ;
ON INIT ( oThis:oDlg:Move(0,0) ) ;
VALID !paOpenWnd[IS_WSE31001]
ACTIVATE DIALOG ::oDlg AS MDICHILD ;
ON INIT ( oThis:oDlg:Move(0,0) ) ;
VALID !paOpenWnd[IS_WSE31001]
nageswaragunupudi wrote:Please reproduce the error.log.
Do you have the problem in mdi-dialog only or in normal dialogs also?
Return to Bugs report & fixes / Informe de errores y arreglos
Users browsing this forum: No registered users and 20 guests