1. Raymond Longoria
  2. PowerBuilder
  3. Tuesday, 15 February 2022 18:27 PM UTC

I am working in Powerbuilder 2021. Can someone point me to documentation for making a menu appear when right clicking a datawindow?

Accepted Answer
John Fauss Accepted Answer Pending Moderation
  1. Friday, 18 February 2022 03:55 AM UTC
  2. PowerBuilder
  3. # Permalink

Raymond -

If you are interested, I've just posted a sample PB program in CodeXchange that implements a simple popup menu in a DataWindow control:

https://community.appeon.com/index.php/codeexchange/powerbuilder/312-a-simple-popup-menu-for-datawindows#407

I've included in the download zip file a Word document that explains the steps you can follow to create your own popup menu and ancestor DataWindow. control.

Best wishes, John

Comment
  1. Raymond Longoria
  2. Thursday, 17 March 2022 19:07 PM UTC
John,

Thank you for the code. I used it and it worked great!
  1. Helpful
  1. John Fauss
  2. Thursday, 17 March 2022 20:21 PM UTC
That's great to hear, Raymond! You're welcome. Thanks for letting me know.
  1. Helpful
There are no comments made yet.
Sivaprakash BKR Accepted Answer Pending Moderation
  1. Wednesday, 16 February 2022 07:19 AM UTC
  2. PowerBuilder
  3. # 1

Hello,

Simply,

Create a new event, with Event ID: pbm_rbuttondown with your own Event Name.  Open your popup menu in that event.

For the full example code, kindly refer to the STD framework as suggested by John Fauss.  

HTH

Happiness Always
BKR Sivaprakash

 

Comment
There are no comments made yet.
Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Tuesday, 15 February 2022 19:30 PM UTC
  2. PowerBuilder
  3. # 2

Hi John;

  That you for the STD Framework mention!

@Raymond ... FYI: https://sourceforge.net/projects/stdfndclass/files/Applications/PowerBuilder/OrderEntry

  Have a look at the "vs_dc_master" ancestor DW Control object located in the "STD_FC_Base.pbl" and its "rbuttondown" event for the PopMenu use example.

HTH

Regards ... Chris

 

Comment
There are no comments made yet.
John Fauss Accepted Answer Pending Moderation
  1. Tuesday, 15 February 2022 18:59 PM UTC
  2. PowerBuilder
  3. # 3

Hi, Raymond - 

Use the PopMenu PowerScript function.

I suggest you examine examples, such as the PFC framework or Chris Pollach's STD framework. I'm sure Chris will chime in to call out the object(s), events, functions in his framework. As for the PFC, the ancestor DW popup menu class is pfc_m_dw in the pfcmain.pbl. The DW's popup menu is displayed via the PopMenu PowerScript command in the RButtonUp event of the ancestor DataWindow control, pfc_u_dw, which also reside in the pfcmain.pbl.

You might also try search the Community Q&A for "right click" or "popup menu".

I hope this helps point you in the right direction.

Best regards, John

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.