Page 1 of 1
Definir font richedit5
Posted: Sat Dec 23, 2023 10:28 am
by jpcavagnaro
Hola gente, como puedo definir el font por defecto Arial en lugar de MS Sans
Re: Definir font richedit5
Posted: Sun Dec 24, 2023 10:47 am
by cnavarro
Look commad for RICHEDT5
#command @ <nTop>, <nLeft> RICHEDIT5 [ <oRTF> VAR ] <uVar> ;
[ <dlg: OF, WINDOW, DIALOG> <oWnd> ] ;
[ SIZE <nWidth>, <nHeight> ] ;
[ FONT <oFont> ] ;
[ <pixel: PIXEL> ] ;
[ MESSAGE <cMsg> ] ;
[ <lHScroll: HSCROLL> ] ;
[ <readonly: READONLY, NO MODIFY> ] ;
[ WHEN <uWhen> ] ;
[ VALID <uValid> ] ;
[ ON CHANGE <uChange> ] ;
[ <lDesign: DESIGN> ] ;
[ <lHighlight: HIGHLIGHT> ] ;
[ <file: FILE, FILENAME> <cFileName> ] ;
[ RTFSIZE <nRTFSize> ] ;
[ <lNoURL: NO URL> ] ;
[ <lNoScroll: NO SCROLL> ] ;
[ <lNoBorder: NOBORDER, NO BORDER> ] ;
[ MARGINLEFT <nLeftMargin> ] ;
[ <lBar: BARBUTTON> ] ;
or when you define your control, use
Try, please
Re: Definir font richedit5
Posted: Tue Dec 26, 2023 11:02 pm
by jpcavagnaro
Gracias por responder, lo llamaba así: RichEdit5( @xHecho, "Desvio", 9, 9, 30, 140 )
sin definir en el programa, lo que hice fue definir:
Function RichEdit5( cText, cTitle, nTop, nLeft, nBottom, nRight )
local oFont, oDlg
local hDLL
local uTemp := If( ! Empty( cText ), cText, '' )
local lRich := .F., lGTF := .F., lOk := .F.
publ oMemo
DEFAULT nTop := 9, nLeft := 9, nBottom := 27, nRight := 71.5, ;
cTitle := "RichEdit5"
* DEFINE FONT oFont NAME "Arial" SIZE 0, - 14
oFont := TFont():New( 'Arial', 0, -15 , .f.,.f., 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
omemo:SetFont( oFont )
ACTIVATE DIALOG oDlg CENTERED ;
ON INIT ( oMemo:LoadRtf( cText ), oMemo:PostMsg( WM_KEYDOWN, VK_HOME, 0 ) , BuildRichEditBar( oDlg, oMemo, { | c | cText := c } ), oDlg:ReSize(), SendMessage( oMemo:hWnd, EM_SETLANGOPTIONS, 0, nOr( IMF_SPELLCHECKING, IMF_TKBPREDICTION, IMF_TKBAUTOCORRECTION ) ) )
oFont:End()
return lOk
Así funciono perfecto, muchas gracias
Re: Definir font richedit5
Posted: Wed Dec 27, 2023 8:41 am
by Otto
Factors that could influence the future of Rich Text Editors
Hello friends,
Shouldn't we consider developing an alternative to RichEdit in parallel using WebView, e.g., with the TinyMCE editor?
I'm just thinking to be prepared for the future. That won't happen overnight.
Factors that could influence the future of Rich Text Editors.
There is a rising demand for more user-friendly and flexible editors that work across various platforms and devices. Developers might continue to add features such as drag-and-drop editing, enhanced multimedia support, and better integration with cloud services.
The integration of real-time collaboration features similar to Google Docs could be a crucial component of future Rich Text Editors. This would allow users to collaboratively and synchronously edit documents.
Optimizing Rich Text Editors for mobile devices is an important trend, as more users work on mobile.
TinyMCE:
A lightweight yet powerful WYSIWYG editor that can be easily integrated into web applications. TinyMCE is customizable and offers a variety of plugins to expand its functionality.
Regards,
Otto