Page 1 of 6

RICHEDITBOX

Posted: Thu Nov 22, 2012 8:32 pm
by andyglezl
Hola a todos

Estoy tratando de manejar en un control RICHEDITBOX un archivo con formato .rtf
Para cargarlo no hay problema, pero al modificarlo y quererlo grabar ya sea en un
campo memo ó en un archivo.rtf, me guarda solo el texto, no el formato.

Alguna idea de como grabarlo con formato ?

Gracias

-----------------------------------------------------------------------------
Hi all

I'm trying to run a control RICHEDITBOX format file. RTF
To load it no problem, but wanting to modify it and record either in a
memo field or in a archivo.rtf, I saved only the text, not the formatting.

Any idea as to record format?

thanks

Re: RICHEDITBOX

Posted: Thu Nov 22, 2012 9:34 pm
by danielmaximiliano
andyglezl wrote:Hola a todos

Estoy tratando de manejar en un control RICHEDITBOX un archivo con formato .rtf
Para cargarlo no hay problema, pero al modificarlo y quererlo grabar ya sea en un
campo memo ó en un archivo.rtf, me guarda solo el texto, no el formato.

Alguna idea de como grabarlo con formato ?

Gracias thanks
Mira en / Look
Minigui Sample in

Code: Select all

C:\MiniGUI\SAMPLES\Advanced\RichEditEx\Demo.prg

Re: RICHEDITBOX

Posted: Thu Nov 22, 2012 10:10 pm
by andyglezl
Hola Maximiliano

Gracias por la bienvenida !

Respecto a lo del RICHEDITBOX
-----------------------------------------------------
Mira en / Look Minigui Sample in

Code:
C:\MiniGUI\SAMPLES\Advanced\RichEditEx\Demo.prg

----------------------------------------------------

No encuentro dicha carpeta, bajé e instalé el HMG 3.0.44 y me quedo
como la imagende abajo, y en el directorio MiniGui tampoco lo encuentro

Re: RICHEDITBOX

Posted: Thu Nov 22, 2012 11:10 pm
by danielmaximiliano
me referia a Minigui extended y no a HMG.3.0.46
si miras veras que la ruta de instalacion de HMG es c:\hmg.3.0.46 y HMG extended otra.

te adjunto el codigo para que saques la funcion
Richedit.rar
(3.28 KiB) Downloaded 469 times

Re: RICHEDITBOX

Posted: Wed Dec 04, 2013 4:58 pm
by serge_girard
Daniel,

How can I get this working?

HMG 3.1.5?

I get several compile errors:

P:\hmg.3.0.44\SAMPLES\RICHEDIT\demo.prg(23) Error E0030 Syntax error "syntax error at 'AUTOADJUST'"
P:\hmg.3.0.44\SAMPLES\RICHEDIT\demo.prg(62) Error E0030 Syntax error "syntax error at '@'"
P:\hmg.3.0.44\SAMPLES\RICHEDIT\demo.prg(64) Error E0030 Syntax error "syntax error at 'CONTEXT'"
P:\hmg.3.0.44\SAMPLES\RICHEDIT\demo.prg(96) Error E0030 Syntax error "syntax error at 'CONTEXT'"
P:\hmg.3.0.44\SAMPLES\RICHEDIT\demo.prg(135) Error E0030 Syntax error "syntax error at '.'"
P:\hmg.3.0.44\SAMPLES\RICHEDIT\demo.prg(136) Error E0030 Syntax error "syntax error at '.'"
P:\hmg.3.0.44\SAMPLES\RICHEDIT\demo.prg(182) Error E0030 Syntax error "syntax error at '.'"
P:\hmg.3.0.44\SAMPLES\RICHEDIT\demo.prg(223) Error E0030 Syntax error "syntax error at '('"
8 errors

Thx,
Serge

Re: RICHEDITBOX

Posted: Wed Dec 04, 2013 5:29 pm
by danielmaximiliano
Serge : Sample is HMGe (HMG extended "Minigui" by Grigory Filatov)

Re: RICHEDITBOX

Posted: Wed Dec 04, 2013 5:39 pm
by serge_girard
Daniel,


I see. Is it not avaiable / possible in HMG?

Serge

Re: RICHEDITBOX

Posted: Thu Dec 05, 2013 10:10 am
by esgici
Hi All
serge_girard wrote:...possible in HMG?
IMO the simplest is always the best !

Edit_RTF is a simple and ready to use forever ( will not be influenced by future changes on RTF format specifications ;) ) HMG Sample.

Of course this is for whose don't like reinvent the wheel ;)
Screen shoot of Edit_RTF sample
Screen shoot of Edit_RTF sample
EditRTF.JPG (81.88 KiB) Viewed 6823 times
EditRTF(src&data).zip
Edit_RTF Source and sample data files
(15 KiB) Downloaded 386 times
EditRTF(exe).zip
Edit_RTF executable
(1015.98 KiB) Downloaded 370 times
Happy HMG :D

Re: RICHEDITBOX

Posted: Thu Dec 05, 2013 12:59 pm
by serge_girard
Thanks Esgici !


Regretfully not quiet what I meant. Your program does EXECUTE FILE cRTFName (opens RTF Editor / Wordpad) but not really edit the text.
What I wanted was RICHEDITBOX or RICHTEXTBOX (what's in a name?) and save in the database instead of a separate file.

Greetings,

Serge

Re: RICHEDITBOX

Posted: Thu Dec 05, 2013 10:13 pm
by esgici
serge_girard wrote:Your program does EXECUTE FILE cRTFName (opens RTF Editor / Wordpad)
Correct !
but not really edit the text.
If not really is it virtually edit ?
What I wanted was RICHEDITBOX or RICHTEXTBOX (what's in a name?)
RICHEDITBOX control of HMG isn't a fully functional rich-text editor and it's very difficult to being such thing while RT specifications changes this observed frequency.

And in my opinion while exist a working editor ( WordPad or MS Word or an equivalent in Open Office ), it's unnecessary working to write a NEW RT Editor :arrow:

Of course this is a personal preference, everyone may follow ways he / she like.
and save in the database instead of a separate file.
This is possible and not quite different.

Saving anything to anywhere isn't related to editing method used.
  • Beg : Open Wordpad to edit R Text file
    Read saved RTFile content as a text by HB_MEMOREAD()
    Write ( REPLACE) this text to a MEMO field
    When editing required save MEMO field contain by HB_MEMOWRIT() to a file with .RTF extension
    Go to Beg
As you can see, only difference is using an intermediate file.

Again, this is a personal preference and personally I don't like re-inventing wheel :arrow:

Happy HMG :D