FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Memoedit
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: Memoedit
Posted: Tue Mar 18, 2014 04:34 PM
TimStone wrote:How about with a GET for a memo:

REDEFINE GET oTxt:ltrtxt MEMO MESSAGE "Edit the text, and press OK to save your changes, or Cancel to exit" ;
ID 912 OF oDlg UPDATE

Get with Memo/Text is only meant for editing pure text.

MemoEdit() function uses Get or RichEdit or FGet depending on the requirement to edit text, rtf or gtf.
Regards



G. N. Rao.

Hyderabad, India
Posts: 3022
Joined: Fri Oct 07, 2005 01:45 PM
Re: Memoedit
Posted: Tue Mar 18, 2014 04:46 PM

OK ... but that is the feature I thought had been implemented, and which would be very helpful.

I never edit a memo exclusively. It is part of a record and I want to be able to edit all of the fields at the same time. It would be nice to have an option with a control to use RTF. In a command line, the addition of RTF before UPDATE, allowing it to edit any imported text as RTF, and then save it with the record, would be a real plus.

Tim Stone
http://www.MasterLinkSoftware.com
http://www.autoshopwriter.com
timstone@masterlinksoftware.com
Using: FWH 23.10 with Harbour 3.2.0 / Microsoft Visual Studio Community 2022-24 32/64 bit
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: Memoedit
Posted: Wed Mar 19, 2014 12:58 AM

We can use richedit command instead of get command for this purpose.

@ r, c RICHEDIT oRtf VAR cText OF oDlg ............... etc ..........

We need to include richedit.ch

Regards



G. N. Rao.

Hyderabad, India
Posts: 3022
Joined: Fri Oct 07, 2005 01:45 PM
Re: Memoedit
Posted: Wed Mar 19, 2014 03:26 PM

But I'm using a RESOURCE file ...

Tim Stone
http://www.MasterLinkSoftware.com
http://www.autoshopwriter.com
timstone@masterlinksoftware.com
Using: FWH 23.10 with Harbour 3.2.0 / Microsoft Visual Studio Community 2022-24 32/64 bit
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: Memoedit
Posted: Wed Mar 19, 2014 06:08 PM

REDEFINE RICHEDIT ...

Regards



G. N. Rao.

Hyderabad, India
Posts: 3022
Joined: Fri Oct 07, 2005 01:45 PM
Re: Memoedit
Posted: Wed Mar 19, 2014 10:50 PM

REDEFINE RICHEDIT oRtf VAR oTxt:ltrtxt ID 912 OF oDlg UPDATE

Fails on compile at RICHEDIT.
Yes, #INCLUDE "richedit.ch" is in the file

Tim Stone
http://www.MasterLinkSoftware.com
http://www.autoshopwriter.com
timstone@masterlinksoftware.com
Using: FWH 23.10 with Harbour 3.2.0 / Microsoft Visual Studio Community 2022-24 32/64 bit
Posts: 159
Joined: Wed Mar 28, 2007 01:19 PM
Re: Memoedit
Posted: Thu Mar 20, 2014 04:36 PM

Hi to all, sorry for jumping in...
The only example in SAMPLES with RTF from resources is TESTRICH.PRG but does not use RICHEDIT.CH
It compiles and runs OK.
If RICHEDIT.CH is included and:
oRich = TRichEdit():Redefine( 100, { || "" }, oDlg )
is changed to:
REDEFINE RICHEDIT oRich ID 100 OF oDlg
the program compiles but aborts with:
Error BASE/1005 No exported variable: LHIGHLIGHT
in the line:
oRich:lHighLight = .f.
Strange...
Regards, Euclides

Posts: 3022
Joined: Fri Oct 07, 2005 01:45 PM
Re: Memoedit
Posted: Thu Mar 20, 2014 04:51 PM

I am working with the latest copy of FWH and I get the same error with, or without richedit.ch.

It simply will not build.

Tim

Tim Stone
http://www.MasterLinkSoftware.com
http://www.autoshopwriter.com
timstone@masterlinksoftware.com
Using: FWH 23.10 with Harbour 3.2.0 / Microsoft Visual Studio Community 2022-24 32/64 bit
Posts: 9020
Joined: Thu Oct 06, 2005 08:17 PM
Re: Memoedit
Posted: Thu Mar 20, 2014 06:49 PM

I was not be able to reproduce the problem. Can I see a reduced self-contained sample, please?

EMG

Posts: 3022
Joined: Fri Oct 07, 2005 01:45 PM
Re: Memoedit
Posted: Thu Mar 20, 2014 08:42 PM

It is in a .prg that cannot be condensed.

To put it very simply, here is the original code line which compiles perfectly:

REDEFINE GET oTxt:ltrtxt MEMO ID 912 OF oDlg UPDATE

Here is the revised code line that fails:

REDEFINE RICHEDIT oRtf VAR oTxt:ltrtxt ID 912 OF oDlg UPDATE

The error message, when compiling with xHarbour ( .com version ) is:

Error E0030 Syntax error: "syntax error at 'RICHEDIT'"

Tim Stone
http://www.MasterLinkSoftware.com
http://www.autoshopwriter.com
timstone@masterlinksoftware.com
Using: FWH 23.10 with Harbour 3.2.0 / Microsoft Visual Studio Community 2022-24 32/64 bit
Posts: 6755
Joined: Wed Feb 15, 2012 08:25 PM
Re: Memoedit
Posted: Thu Mar 20, 2014 09:00 PM

I think the problem is in the UPDATE

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: 3022
Joined: Fri Oct 07, 2005 01:45 PM
Re: Memoedit
Posted: Thu Mar 20, 2014 09:10 PM

Removing update allows it to build.

The problem is that there is no bar to allow for use of RTF features. It simply brings it up as text.
The text is already there. I want to bring it up from the original text as RTF, edit it and then save it.

Tim Stone
http://www.MasterLinkSoftware.com
http://www.autoshopwriter.com
timstone@masterlinksoftware.com
Using: FWH 23.10 with Harbour 3.2.0 / Microsoft Visual Studio Community 2022-24 32/64 bit
Posts: 6755
Joined: Wed Feb 15, 2012 08:25 PM
Re: Memoedit
Posted: Thu Mar 20, 2014 09:21 PM
I'm not sure I understood your message
Excuse my English
Using the HIGHLIGHT clause?

# xcommand REDEFINE RICHEDIT [<oRTF> VAR] <uVar>;
              [ID <nId>];
              [<dlg: OF, WINDOW, dialog> <oDlg>];
              [HELP ID> <help:HELPID, <nHelpId>];
              [FONT <oFont>];
              [MESSAGE <cMsg>];
              [<readonly: READONLY, MODIFY> NO];
              [<lHighlight: HIGHLIGHT>;
              [<file: FILE, filename> <cFileName>];
              [RTFSIZE <nRTFSize>];
              [<lNoURL: URL> NO];
              [WHEN <uWhen>];
              [VALID <uValid>];
              [ON CHANGE <uChange>]
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: 3022
Joined: Fri Oct 07, 2005 01:45 PM
Re: Memoedit
Posted: Thu Mar 20, 2014 09:27 PM

1) The current data is stored in an .fpt file as TEXT.
2) I want to call it up in RichEdit mode
3) I want the control to have the toolbar so I can do the editing of the text
4) The final result should be saved as RTF in the .fpt file.

If I use MEMOEDIT( ), this is supported with a .t. in the 7th parameter.

I am using an .rc dialog. and so I wanted to replace the GET ( as shown in an earlier post in this thread ) with the RichEdit capability.

I am following the guidance I was given to do so.

Now, the Edit control ( which is now a RichEdit control ), is completely blank. The text in the memo field does not display, nor does the toolbar needed for RichEdit.

I don't see a sample of how to do this.

Tim Stone
http://www.MasterLinkSoftware.com
http://www.autoshopwriter.com
timstone@masterlinksoftware.com
Using: FWH 23.10 with Harbour 3.2.0 / Microsoft Visual Studio Community 2022-24 32/64 bit
Posts: 6755
Joined: Wed Feb 15, 2012 08:25 PM
Re: Memoedit
Posted: Thu Mar 20, 2014 09:32 PM

You've seen the example?
SetChildBar ( testrtf.prg)

Edit: I understand that maybe what you mean is that the control REDEFINE not include the BAR, no?

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

Continue the discussion