Memoedit

Re: Memoedit

Postby nageswaragunupudi » Tue Mar 18, 2014 4: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
User avatar
nageswaragunupudi
 
Posts: 10624
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: Memoedit

Postby TimStone » Tue Mar 18, 2014 4: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
User avatar
TimStone
 
Posts: 2944
Joined: Fri Oct 07, 2005 1:45 pm
Location: Trabuco Canyon, CA USA

Re: Memoedit

Postby nageswaragunupudi » 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
User avatar
nageswaragunupudi
 
Posts: 10624
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: Memoedit

Postby TimStone » Wed Mar 19, 2014 3: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
User avatar
TimStone
 
Posts: 2944
Joined: Fri Oct 07, 2005 1:45 pm
Location: Trabuco Canyon, CA USA

Re: Memoedit

Postby nageswaragunupudi » Wed Mar 19, 2014 6:08 pm

REDEFINE RICHEDIT ...
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10624
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: Memoedit

Postby TimStone » 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
User avatar
TimStone
 
Posts: 2944
Joined: Fri Oct 07, 2005 1:45 pm
Location: Trabuco Canyon, CA USA

Re: Memoedit

Postby Euclides » Thu Mar 20, 2014 4: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
User avatar
Euclides
 
Posts: 156
Joined: Wed Mar 28, 2007 1:19 pm

Re: Memoedit

Postby TimStone » Thu Mar 20, 2014 4: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
User avatar
TimStone
 
Posts: 2944
Joined: Fri Oct 07, 2005 1:45 pm
Location: Trabuco Canyon, CA USA

Re: Memoedit

Postby Enrico Maria Giordano » Thu Mar 20, 2014 6:49 pm

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

EMG
User avatar
Enrico Maria Giordano
 
Posts: 8710
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Re: Memoedit

Postby TimStone » Thu Mar 20, 2014 8: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
User avatar
TimStone
 
Posts: 2944
Joined: Fri Oct 07, 2005 1:45 pm
Location: Trabuco Canyon, CA USA

Re: Memoedit

Postby cnavarro » Thu Mar 20, 2014 9: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
User avatar
cnavarro
 
Posts: 6541
Joined: Wed Feb 15, 2012 8:25 pm
Location: España

Re: Memoedit

Postby TimStone » Thu Mar 20, 2014 9: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
User avatar
TimStone
 
Posts: 2944
Joined: Fri Oct 07, 2005 1:45 pm
Location: Trabuco Canyon, CA USA

Re: Memoedit

Postby cnavarro » Thu Mar 20, 2014 9: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
User avatar
cnavarro
 
Posts: 6541
Joined: Wed Feb 15, 2012 8:25 pm
Location: España

Re: Memoedit

Postby TimStone » Thu Mar 20, 2014 9: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
User avatar
TimStone
 
Posts: 2944
Joined: Fri Oct 07, 2005 1:45 pm
Location: Trabuco Canyon, CA USA

Re: Memoedit

Postby cnavarro » Thu Mar 20, 2014 9: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
User avatar
cnavarro
 
Posts: 6541
Joined: Wed Feb 15, 2012 8:25 pm
Location: España

Previous

Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 61 guests