FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Richedit5 controlar salida sin guardar
Posts: 155
Joined: Tue Dec 30, 2008 03:07 AM
Richedit5 controlar salida sin guardar
Posted: Tue Mar 21, 2023 03:31 PM

Hola gente, estoy usando Richedit5 así, y me gustaría controlar si modificaron el texto y salieron por la X sin guardar, se puede?

Static Function RichEdit5( cText, cTitle, nTop, nLeft, nBottom, nRight )

local oFont, oDlg, oMemo

local hDLL

local uTemp := If( ! Empty( cText ), cText, '' )

local lRich := .F., lGTF := .F., lOk := .F.

DEFAULT nTop := 9, nLeft := 9, nBottom := 27, nRight := 71.5,;

       cTitle := "RichEdit5"

DEFINE FONT oFont NAME "Ms Sans Serif" SIZE 0, -10

DEFINE DIALOG oDlg FROM nTop, nLeft TO nBottom, nRight ;

  TITLE cTitle FONT oFont

oDlg:lTruePixel := .F.

oDlg:lHelpIcon := .F.

@ 30, 3 RICHEDIT5 oMemo VAR uTemp OF oDlg PIXEL SIZE 200, 200

oDlg:oClient = oMemo

ACTIVATE DIALOG oDlg CENTERED ;

  ON INIT ( BuildRichEditBar( oDlg, oMemo, { | c | cText := c } ), oDlg:ReSize() )

oFont:End()

return lOk

Saludos

Jorge

Continue the discussion