RICHEDITBOX

HMG en Español

Moderator: Rathinagiri

User avatar
andyglezl
Posts: 1461
Joined: Fri Oct 26, 2012 7:58 pm
Location: Guadalajara Jalisco, MX
Contact:

RICHEDITBOX

Post 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
Attachments
RichEditBox2.JPG
RichEditBox2.JPG (95.89 KiB) Viewed 7457 times
RichEditBox.JPG
RichEditBox.JPG (112.54 KiB) Viewed 7457 times
Andrés González López
Desde Guadalajara, Jalisco. México.
User avatar
danielmaximiliano
Posts: 2647
Joined: Fri Apr 09, 2010 4:53 pm
Location: Argentina
Contact:

Re: RICHEDITBOX

Post 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
*´¨)
¸.·´¸.·*´¨) ¸.·*¨)
(¸.·´. (¸.·` *
.·`. Harbour/HMG : It's magic !
(¸.·``··*

Saludos / Regards
DaNiElMaXiMiLiAnO

Whatsapp. := +54901169026142
Telegram Name := DaNiElMaXiMiLiAnO
User avatar
andyglezl
Posts: 1461
Joined: Fri Oct 26, 2012 7:58 pm
Location: Guadalajara Jalisco, MX
Contact:

Re: RICHEDITBOX

Post 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
Attachments
RichEditBox4.JPG
RichEditBox4.JPG (139.89 KiB) Viewed 7442 times
RichEditBox3.JPG
RichEditBox3.JPG (134.64 KiB) Viewed 7442 times
Andrés González López
Desde Guadalajara, Jalisco. México.
User avatar
danielmaximiliano
Posts: 2647
Joined: Fri Apr 09, 2010 4:53 pm
Location: Argentina
Contact:

Re: RICHEDITBOX

Post 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
*´¨)
¸.·´¸.·*´¨) ¸.·*¨)
(¸.·´. (¸.·` *
.·`. Harbour/HMG : It's magic !
(¸.·``··*

Saludos / Regards
DaNiElMaXiMiLiAnO

Whatsapp. := +54901169026142
Telegram Name := DaNiElMaXiMiLiAnO
User avatar
serge_girard
Posts: 3364
Joined: Sun Nov 25, 2012 2:44 pm
DBs Used: 1 MySQL - MariaDB
2 DBF
Location: Belgium
Contact:

Re: RICHEDITBOX

Post 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
There's nothing you can do that can't be done...
User avatar
danielmaximiliano
Posts: 2647
Joined: Fri Apr 09, 2010 4:53 pm
Location: Argentina
Contact:

Re: RICHEDITBOX

Post by danielmaximiliano »

Serge : Sample is HMGe (HMG extended "Minigui" by Grigory Filatov)
*´¨)
¸.·´¸.·*´¨) ¸.·*¨)
(¸.·´. (¸.·` *
.·`. Harbour/HMG : It's magic !
(¸.·``··*

Saludos / Regards
DaNiElMaXiMiLiAnO

Whatsapp. := +54901169026142
Telegram Name := DaNiElMaXiMiLiAnO
User avatar
serge_girard
Posts: 3364
Joined: Sun Nov 25, 2012 2:44 pm
DBs Used: 1 MySQL - MariaDB
2 DBF
Location: Belgium
Contact:

Re: RICHEDITBOX

Post by serge_girard »

Daniel,


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

Serge
There's nothing you can do that can't be done...
User avatar
esgici
Posts: 4543
Joined: Wed Jul 30, 2008 9:17 pm
DBs Used: DBF
Location: iskenderun / Turkiye
Contact:

Re: RICHEDITBOX

Post 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 6824 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
Viva INTERNATIONAL HMG :D
User avatar
serge_girard
Posts: 3364
Joined: Sun Nov 25, 2012 2:44 pm
DBs Used: 1 MySQL - MariaDB
2 DBF
Location: Belgium
Contact:

Re: RICHEDITBOX

Post 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
There's nothing you can do that can't be done...
User avatar
esgici
Posts: 4543
Joined: Wed Jul 30, 2008 9:17 pm
DBs Used: DBF
Location: iskenderun / Turkiye
Contact:

Re: RICHEDITBOX

Post 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
Viva INTERNATIONAL HMG :D
Post Reply