1. Brian McCarthy
  2. PowerBuilder
  3. Monday, 2 December 2024 20:11 PM UTC

We have a large PowerBuilder 2021 application with many DataWindows. I want to have Copy (Ctrl+C) and Paste (Ctrl+V) implemented globally throughout the application. 

This does not seem to work out of the box and I think custom code may be required. 

Are there any examples to how to implement something like this? We would want all text fields throughout the application to have this same functionality.  

---

[edit]

So far I've tried to create a menu item in the application for "Ctrl+C" and "Ctrl+V" that is bound to those keys. Inside of the handler for those menu items I am trying to access the current control which has focus. I have tried to get the control with focus by using the below pieces of code, but both did not work.

"""
Control lw_control // Control is not a valid type

lw_control = GetFocus() 
""" 

 

and:


"""
Any lw_control
lw_control = Message.ObjectFocus // object focus doesn't exist on Message.
"""

Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Monday, 2 December 2024 20:26 PM UTC
  2. PowerBuilder
  3. # 1

Hi Brian;

  FWIW: Since the DWO is not inheritable .. When I need this standard DWO column / label object behaviour, I typically implement this via a Global Function(s) called from the DWO's "container" the DW Control.              Food for thought.  HTH

Regards .. Chris

Comment
There are no comments made yet.
Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Monday, 2 December 2024 20:26 PM UTC
  2. PowerBuilder
  3. # 2

Hi Brian;

  FWIW: Since the DWO is not inheritable .. When I need this standard DWO column / label object behaviour, I typically implement this via a Global Function(s) called from the DWO's "container" the DW Control.              Food for thought.  HTH

Regards .. Chris

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.
We use cookies which are necessary for the proper functioning of our websites. We also use cookies to analyze our traffic, improve your experience and provide social media features. If you continue to use this site, you consent to our use of cookies.