FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour error in Richedit [bug in FWH]
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: error in Richedit [bug in FWH]
Posted: Thu Jan 26, 2012 09:47 PM

John,

In a dialog you have to press CRLF (enter) before the style change.

I have tried to dynamically modify the RTF but without success

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 417
Joined: Tue Feb 23, 2010 03:09 PM
Re: error in Richedit [bug in FWH]
Posted: Thu Jan 26, 2012 10:34 PM

Antonio,

Thanks for reply, but this way is unusable. It should work as Word.

Is it possible to fix it?.

Thanks so much,

FWH 11.11, Harbour 3.1 and Borland C++ 5.82
Posts: 417
Joined: Tue Feb 23, 2010 03:09 PM
Re: error in Richedit [bug in FWH]
Posted: Fri Jan 27, 2012 10:02 AM

Antonio,

It worked fine with FW 11.03.

What happened before?.

Please, I need a fix urgent.

Thank you.

FWH 11.11, Harbour 3.1 and Borland C++ 5.82
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: error in Richedit [bug in FWH]
Posted: Fri Jan 27, 2012 10:34 AM
John,

We have not modified Class TRichEdit neither its C functions lately:



regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: error in Richedit [bug in FWH]
Posted: Fri Jan 27, 2012 10:37 AM

John,

If it was working fine in FWH 11.03 that means 30 x 9 = 270 days aprox.

Maybe my changes for:

  • Adapting internal\richedit.c to 64 bits (232 days ago)

made the difference.

Are you using Borland ?

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 417
Joined: Tue Feb 23, 2010 03:09 PM
Re: error in Richedit [bug in FWH]
Posted: Fri Jan 27, 2012 10:53 AM

Antonio,

Yes, I use BORLAND 5.82.

Thanks.

FWH 11.11, Harbour 3.1 and Borland C++ 5.82
Posts: 417
Joined: Tue Feb 23, 2010 03:09 PM
Re: error in Richedit [bug in FWH]
Posted: Fri Jan 27, 2012 10:54 AM

Also, in FW 11.03 I used Harbour 2.x provided by Fivetech (with the installer).

FWH 11.11, Harbour 3.1 and Borland C++ 5.82
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: error in Richedit [bug in FWH]
Posted: Fri Jan 27, 2012 11:00 AM

John,

The changes that I did only affected Microsoft code, not Borland.

So if it was working fine in 11.03 and now it is not, then it may be the side effect of another change. That will make it harder to locate it to provide a quick fix.

Can't you use a window instead of a dialog ? That would solve it for now...

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 417
Joined: Tue Feb 23, 2010 03:09 PM
Re: error in Richedit [bug in FWH]
Posted: Fri Jan 27, 2012 11:05 AM

Antonio,

Thanks, but I can´t use a Window. The Richedit must be in the dialog (in fact, it´s a Folder with several Pages).

The point is why FW 11.11 select all text when issuing a oRtf:Refresh().

FWH 11.11, Harbour 3.1 and Borland C++ 5.82
Posts: 824
Joined: Thu Oct 13, 2005 07:39 AM
Re: error in Richedit [bug in FWH]
Posted: Mon Jan 30, 2012 07:54 AM

Antonio, John,

TRichEdit inherits from TControl and TWindow, maybe there has been made some changes since 11.03 causing that behavior.

You could compare the sources to find out what happened.

Just an idea ...

kind regards

Stefan
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: error in Richedit [bug in FWH]
Posted: Thu Feb 02, 2012 11:51 PM

Stephan,

We are going to check from version 11.03 to see what may have caused the difference

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: error in Richedit [bug in FWH]
Posted: Sat Feb 25, 2012 05:34 PM

Stephan, John,

We have been doing some more tests with the RichEdit control and found that there are different behaviors on it when using it on a window or on a dialog. The tests I have done use pure C language (no Harbour, no FWH).

I plan to publish the tests here for your review, thanks :-)

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 824
Joined: Thu Oct 13, 2005 07:39 AM
Re: error in Richedit [bug in FWH]
Posted: Mon Feb 27, 2012 07:52 AM
Antonio Linares wrote:
I plan to publish the tests here for your review, thanks :-)


Ok
kind regards

Stefan
Posts: 990
Joined: Thu Nov 17, 2005 05:49 PM
Re: error in Richedit [bug in FWH]
Posted: Tue Feb 28, 2012 12:10 AM
Hi everyone;

If I follow the discussion correctly, then I confirm that I've observed this Trichedit unwanted behavior. The problem can be reproduced with \samples\testrich.prg. Simply change line #32 to this:

Code (fw): Select all Collapse
   REDEFINE BUTTON ID 998 ACTION ( oRich:SetBold( .t. ) /*oRich:GoToLine( 10 )*/, oRich:SetFocus() )


Highlight some text and then press the last button (#998). The selected text is set to bold, but immediately after that, all text gets selected (select all).

I did a diff on TRichEdi and could not find any differences dating way back. I think the culprit is TControl. There is a newer method PaintBack() that loos very conspicuous.


Reinaldo.

Continue the discussion