function ShowText( cText )
local oDlg
DEFINE DIALOG oDlg SIZE 600,300 PIXEL TRUEPIXEL
@ 20,20 GET cText MEMO SIZE 560,260 PIXEL OF oDlg READONLY
ACTIVATE DIALOG oDlg CENTERED
return nil
local oWnd
DEFINE WINDOW oWnd
@ 20,20 BUTTON "Show Text" SIZE 80,30 PIXEL OF oWnd ;
ACTION HTMLPOP( GetActiveWindow(), nil, 0x000E, MEMOREAD( "c:\fwh\samples\tutor01.prg" ) )
ACTIVATE WINDOW oWnd CENTERED
FUNCTION ExpandText( cLabTxt )
LOCAL oXTxt, oGt1, oBarExp
LOCAL aPubGrad := { | lInvert | If( ! lInvert, { { 0.50,16776960,16777215 }, ;
{ 0.50,16777215,16776960 } }, { { 0.50,128,16777215 }, { 0.50,16777215,128 } } ) } // HCYAN, WHITE ; RED, WHITE
DEFINE FONT oLfont NAME cSysFont SIZE 0,-14 BOLD
DEFINE DIALOG oXTxt RESOURCE "EXPTXT" BRUSH oBrush transparent OF oWnd FONT oLFont
REDEFINE GET oGt1 VAR cLabTxt MEMO ID 8522 OF oXTxt
oXTxt:bStart = { || oGt1:GoBottom() }
REDEFINE BUTTONBAR oBarExp ID 100 SIZE 60,60 OF oXTxt 2015
oBarExp:bClrGrad := aPubGrad
DEFINE BUTTON oBtnEx1 OF oBarExp RESOURCE "HROK" PROMPT "OK" ACTION ( oXTxt:end()) ;
MESSAGE "Make your changes and press OK"
DEFINE BUTTON oBtnEx2 OF oBarExp RESOURCE "SPELL" PROMPT "Spell" TOOLTIP "Spell check text" ;
ACTION ( cLabTxt := SpellOne( cLabTxt ), oGt1:refresh( ) ) NOBORDER TRANSPARENT
ACTIVATE DIALOG oXTxt ON INIT oBarExp:lTransparent := .F. CENTERED
RETURN( cLabTxt )
EXPTXT DIALOG 0, 0, 660, 410
STYLE WS_POPUP | WS_CAPTION
CAPTION "Text Editor"
{
CONTROL "", 100, "TBar", 0|WS_CHILD|WS_VISIBLE, 0,0, 660, 30
EDITTEXT 8522,10,40,640,360,ES_MULTILINE | ES_WANTRETURN | WS_VSCROLL
}
cnavarro wrote:How long (bytes) ?
oNots:Append(CRLF+CRLF+DTOC(DATE())+" - "+TIME()+" - "+ ALLTRIM(xUSERNAME+CRLF+REPLICATE("-",60)+CRLF+ALLTRIM(cText))
If we have more 30000 bytes, memoedit readonly does not show.
Return to FiveWin for Harbour/xHarbour
Users browsing this forum: No registered users and 63 guests