Definir font richedit5
-
- Posts: 155
- Joined: Tue Oct 11, 2016 1:02 pm
- Location: Luján, bs. as.
Definir font richedit5
Hola gente, como puedo definir el font por defecto Arial en lugar de MS Sans
Jorge
Saludos.
Saludos.
Re: Definir font richedit5
Look commad for RICHEDT5
Try, please
or when you define your control, use#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> ] ;
Code: Select all | Expand
oRtf5:SetFont( oMyFont )
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
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 Oct 11, 2016 1:02 pm
- Location: Luján, bs. as.
Re: Definir font richedit5
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
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
Jorge
Saludos.
Saludos.
Re: Definir font richedit5
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
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
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
https://www.facebook.com/groups/modharbour.club
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
https://www.facebook.com/groups/modharbour.club
********************************************************************