FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Definir font richedit5
Posts: 155
Joined: Tue Dec 30, 2008 03:07 AM
Definir font richedit5
Posted: Sat Dec 23, 2023 10:28 AM

Hola gente, como puedo definir el font por defecto Arial en lugar de MS Sans

Posts: 6755
Joined: Wed Feb 15, 2012 08:25 PM
Re: Definir font richedit5
Posted: Sun Dec 24, 2023 10:47 AM
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
Code (fw): Select all Collapse
    oRtf5:SetFont( oMyFont )
Try, please
Cristobal Navarro

Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noción del tiempo

El secreto de la felicidad no está en hacer lo que te gusta, sino en que te guste lo que haces
Posts: 155
Joined: Tue Dec 30, 2008 03:07 AM
Re: Definir font richedit5
Posted: Tue Dec 26, 2023 11:02 PM

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

Posts: 6984
Joined: Fri Oct 07, 2005 07:07 PM
Re: Definir font richedit5
Posted: Wed Dec 27, 2023 08:41 AM
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

Continue the discussion