1. Ricardo Colarina
  2. PowerBuilder
  3. Friday, 24 August 2018 03:37 AM UTC

Hi Guys,

I'm testing the new PowerBuilder 2017 R3 at the moment, and at least in my VM running Windows 2012 R2, the performance issues in both the RichTextEdit control and the richtext style column that I have issues with seem to have been fixed.  My workaround before the fix was use some Windows APIs to control redraw, and in the datawindow, only show the richtext style column for the current row.  I still need to test PB 2017 R3 on our actual production OS Window 8.1 64bit.

Anyway, in a RichTextEdit control, I added a functionality whereby a hyperlink can be added with a different "text to display" and address.  And with this, I display a tooltip to show the link address when the mouse pointer is hovering over a hyperlink.  The tooltip works by having a datastore with the list of hyperlinks with the text width and the X and Y positions.  Everything is working fine, apart from when a hyperlink can only be viewed if the RichTextEdit control is scrolled vertically.  Once the richtext is scrolled, the tooltip no longer works.  I can't find the event to use, so I thought maybe I use the "other" event.  Does anyone know the proper wparam/lparam to use?  Or can anyone suggest other solutions?  I need determine how many units the RichTextEdit control has been scrolled using the HScrollBar/VScrollBar, Up/Down arrows and the mousewheel.

Thanks.

Best Regards,

Ricardo

Dennis Mitchell Accepted Answer Pending Moderation
  1. Tuesday, 28 August 2018 12:56 PM UTC
  2. PowerBuilder
  3. # 1

Good morning Ricardo,

This doesn't answer your question, but we are having issues with the richtext control also. We have found that the R3 release has corrected the performance issue but we still have issues with the formatting of the rich text. I was wondering if I could reach out to you and see what you did to get the RT to work.

thank you,

dennis

 

Comment
There are no comments made yet.
Ricardo Colarina Accepted Answer Pending Moderation
  1. Wednesday, 29 August 2018 06:51 AM UTC
  2. PowerBuilder
  3. # 2

The richtext format is also still an issue at my end.  The issue is when all texts are selected then removed using Delete key or CTRL+X combo keys or replaced.  Also, if the control/column loses focus due to a messagebox, the issue will come back after the control/column has regained focus.  Not sure if the following (very ugly) workaround will work for you.  You will need to set the richtextedit control/richtext style column to the correct font settings first in the painter.

For richtextedit control:

Use keybd_event API to override the key presses.  You may need to Post/and or use Yield to make things work.

With the delete key,  keybd_event(8) -- backspace, then returning 1 in the key event.

With the CTRL+X combo keys, PasteRTF('blank rtf paragraph with your font settings'), then keybd_event(8).

When all texts are replaced, for example, after doing a spellcheck, keybd_event(37) -- left arrow did the trick for me.

For richtext style column:

Some key presses and mouse events are not being captured.  So you may need to put the code after the column value has changed, or use the Other event.

dw_1.SetColumn(column)
dw_1.SetRichTextFaceName(fontface)
dw_1.SetRichTextSize(fontsize)

Sorry I'm not able to post the actual codes due to work restrictions.

If anyone has a better/prettier workaround, please share your solution.

Apart from the richtext formatting issues, there are still other issues that I would love for Appeon to fix, like key presses and mouse events not being captured for richtext style columns, as I indicated above.  Also just discovered in R3 that if you add a blank line (CR) using the enter key in the richtextedit control, CopyRTF(false) returns blank even if the richtextedit control isn't empty.  It'll also be good if tooltips for hyperlinks are shown without using the workaround that I've done... maybe a new property setting?

Comment
There are no comments made yet.
Ricardo Colarina Accepted Answer Pending Moderation
  1. Wednesday, 29 August 2018 06:58 AM UTC
  2. PowerBuilder
  3. # 3

Hi Guys,

I've managed a workaround to the original issue that I posted.  The link address to display in the tooltip is in a datastore, together with X and Y positions and text widths.  Doing a Find in the datastore for the X and Y coordinates to match the mouse pointer position to get the link address to display in the tooltip works if the richtxtedit control is not (vertically) scrolled.  Once it is scrolled, the match can no longer be found in the datastore.  In this case, the workaround is to Find just the match for the X coordinate.  Then incrementally add to the mouse pointer's Y position then check against the Y position/width in the datastore until found.

Cheers,

Ricardo

Comment
There are no comments made yet.
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.