OnCurTextStyleChange??

ScaleRichView support and discussion (TRichView add-on for WYSIWYG editing)
Post Reply
Shane Stump
Posts: 54
Joined: Mon Jul 31, 2006 2:10 am

OnCurTextStyleChange??

Post by Shane Stump »

Why does this event get called sometimes 3 to 4 times when the user clicks in a different part of the document (especially tables)? I would figure it would only get called ONCE.

Best Regards,

Shane
Sergey Tkachenko
Site Admin
Posts: 17520
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post by Sergey Tkachenko »

This behavior is inherited from TRichViewEdit. Yes, in some cases, OnCurTextStyleChange can be called several times.
I do not think that this is a serious problem.
Shane Stump
Posts: 54
Joined: Mon Jul 31, 2006 2:10 am

Post by Shane Stump »

Well, it killed a feature I was trying to add because of the # of times it was called. I was just going to check if the FontName / Size was the same and eat "repetitive" calls but many times clicking in a different section of the document gets multiple font/size combinations when really there shoud only be one.

Shane
Sergey Tkachenko
Site Admin
Posts: 17520
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post by Sergey Tkachenko »

Several calls of this event make no problem in all demos and real applications that use TRichViewEdit/ScaleRichView. And none of them implement special processing for this.
This event is never called with incorrect parameters, so they are called several times with the same value of CurTextStyleNo.
Shane Stump
Posts: 54
Joined: Mon Jul 31, 2006 2:10 am

Post by Shane Stump »

Well, it was causing me all kinds of problems trying to load a devexpress lookup control. As I said, I would simply filter the repetitive calls but several times an Arial, Font 10 got stuck in between when it shouldn't.

Any how, I just gave up because I have already spent more time on this than I have for it. I just want to get a basic WYSIWUG document editor going and I will put it to bed for now.

I have everything working except my users are telling me printing isn't correct. I cut / paste / translated the pascal code (which wasn't much) to c++. I will have to wait and test later this evening.

Best Regards,

Shane
Sergey Tkachenko
Site Admin
Posts: 17520
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post by Sergey Tkachenko »

"Arial 10" glitch is confirmed, will be fixed in the next update of TRichView
Post Reply