Code: Select all | Expand
#include "FiveWin.ch"
#include "RichEdi5.ch"
function Main()
private oWnd
DEFINE DIALOG oWnd FROM 0,0 TO 200,400 TITLE "Test" PIXEL
ACTIVATE DIALOG oWnd ON INIT Win_Ini()
return nil
procedure Win_Ini()
local cRtf:="First richedit5"
local oRtf, oBt
@ 10, 10 RICHEDIT5 oRTF VAR cRtf OF oWnd SIZE 380, 100 PIXEL
oBt:=TButton():New(oRtf:nBottom+30, oWnd:nWidth-250,"Second", ;
oWnd,, 100, 30,,,, .T.)
oBt:bAction:={||Two_Rtf()}
oWnd:Center()
return
procedure Two_Rtf
private oDlg
DEFINE DIALOG oDlg FROM 0,0 TO 100, 200 TITLE "Second RTF" PIXEL
ACTIVATE DIALOG oDlg ON INIT Dlg_Ini()
return
procedure Dlg_Ini(tip, oObj)
local cRtf:="Second richedit5"
local oRtf
@ 10, 10 RICHEDIT5 oRTF VAR cRtf OF oDlg SIZE 180, 80 PIXEL
oDlg:Center()
return