1. David Vasconcelos
  2. PowerBuilder
  3. Thursday, 16 April 2020 12:12 PM UTC

I have a RTE and I am trying to prevent user from using the key board "cntrl-z" so that it does not clear out the RTE. 

Scenario: Retrieve data from DataBase and paste it to the RTE control, that original paste I am guessing is being added to UNDO stack, I want to make sure that initial paste is not "undone". I would like the undo process to start after the intial load/paste of the info.  Any thoughts...  is there a way to reset the undo after the initial paste? I tried using pbm_undo event on the RTE but not getting it to fire off when user hits "cntrl-z".

 

Win 10 64bit, PB 2017-R3.

Dave V

Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Thursday, 16 April 2020 18:40 PM UTC
  2. PowerBuilder
  3. # 1

Hi David;

  The easiest way that I have always done this (and it works in PowerServer too) is to define a hidden menu item with the CTRL+Z short-cut assigned to it. That should deflect the Ctrl+Z away from the RTE control as it will no longer be receiving it.

HTH

Regards ... Chris

Comment
  1. David Vasconcelos
  2. Friday, 17 April 2020 12:05 PM UTC
Chris, I actually want the undo to work it's just that its going back to far, instead of undoing just the changes it is also undoing the initial load of the data. I am setting the modflag = False after the load. and that has no effect.
  1. Helpful
  1. Chris Pollach @Appeon
  2. Friday, 17 April 2020 16:30 PM UTC
Have you tried the alternate RTE control software "under the hood" of PB?

That is TE control vs TX control or vice versa - as set in the App Painter.
  1. Helpful
There are no comments made yet.
Arnd Schmidt Accepted Answer Pending Moderation
  1. Thursday, 16 April 2020 21:15 PM UTC
  2. PowerBuilder
  3. # 2

Hi David,

in older versions you could (re)set the Modified property of the RichEdit Control.

rte_1.Modified = false

should be your friend.

HTH

Arnd

Comment
  1. David Vasconcelos
  2. Friday, 17 April 2020 12:05 PM UTC
Thanks Arnd, but I was already doing that and seems it has no effect.
  1. Helpful
  1. Armeen Mazda @Appeon
  2. Friday, 17 April 2020 15:40 PM UTC
Are you using TX TextControl or TE Edit control? If you are using TX TextControl, please open a support ticket so we can address this potential bug. Thanks.
  1. Helpful
  1. Arnd Schmidt
  2. Friday, 17 April 2020 15:44 PM UTC
Outch... I tested with an PB 10.5 app using a superclassed MS Rich Edit Control.



  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.