1. Thomas Ritter
  2. PowerBuilder
  3. Wednesday, 23 October 2019 09:51 AM UTC

I am currently using an old PowerBuilder version from 2011. In that version it seems to be impossible to disable certain elements in the pop menu from the rich text edit window.

For example, I would like the user to be able to format text as bold, but not as underlined. I am pretty sure, that configuring the pop menu in my current version is not possible.

Is that possible in the newer PowerBuilder versions?

Miguel Leeuwe Accepted Answer Pending Moderation
  1. Wednesday, 23 October 2019 11:05 AM UTC
  2. PowerBuilder
  3. # 1

Maybe you get a 'hook' into the contextual menu, by using API's or PBNI.

The expert on that here is Roland Smith if I'm not mistaken...

SetWindowsHookEx() etc.

 https://www.codeproject.com/Articles/2082/API-hooking-revealed

 

You'd also have to intercept the CTRL+U key combination.

Comment
There are no comments made yet.
Miguel Leeuwe Accepted Answer Pending Moderation
  1. Wednesday, 23 October 2019 11:00 AM UTC
  2. PowerBuilder
  3. # 2

Oh Okay, now I get it, You only want Specific items to not show or be disabled.

Then no, I don't think you can, unless ....

... you'd use your "own" richtextedit control instead, like the one I've build / and still am improving.

It's based on a .Net richtextedit, so that means you can tweak it in whichever way you'd like.


https://community.appeon.com/index.php/qna/q-a/outlook-email-using-richertext-activex/oldest#filter-sort

 

Comment
There are no comments made yet.
Miguel Leeuwe Accepted Answer Pending Moderation
  1. Wednesday, 23 October 2019 10:57 AM UTC
  2. PowerBuilder
  3. # 3

 

 

Are you sure it's not possible to get rid of the contextual menu?

This is from PB 6.5.1 ... Check or uncheck the "popup menu"

Comment
  1. Miguel Leeuwe
  2. Thursday, 24 October 2019 01:16 AM UTC
I know, .. you don't want to disable ALL of the options. But maybe an option is to disable the default contextual menu completely and then handle the rightmouse click event by writing your own menu?

The event for that that you have to add is "pbm_rbuttonUp", where you can than code your own menu to popup by using "PopMenu()"
  1. Helpful
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.