1. Nick R
  2. PowerBuilder
  3. Friday, 14 June 2019 18:30 PM UTC

Hi,

I am in process of learning PB and i am stuck at finding the right click menu options.

On the right click of the mouse, i get a bunch of options and i choose the one to run a report. I want to figure out which location this template is picked from to run this report. Where is this right click menu in the code? I think, if i can figure out the menu location in the code, i might as well see the template location link. Am I in a right direction?

Any help is much appreciated!!

 

Thanks!

Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Tuesday, 18 June 2019 17:01 PM UTC
  2. PowerBuilder
  3. # 1

Comment
  1. Nick R
  2. Tuesday, 18 June 2019 17:51 PM UTC
Perfect, thanks alotttt!!!!!!!!
  1. Helpful
  1. Chris Pollach @Appeon
  2. Tuesday, 18 June 2019 18:12 PM UTC
You are most welcome.

Note: You can only view ancestor code from the descendant's DDLB. If you want to change the ancestor's code, you will need to open the ancestor object in its related painter..
  1. Helpful
There are no comments made yet.
Nick R Accepted Answer Pending Moderation
  1. Tuesday, 18 June 2019 13:47 PM UTC
  2. PowerBuilder
  3. # 2

Ty Chris. I am trying to understand where the underline PB code is... i am successful in navigating from DWO => DW however, i am going dumb in identifying the code for the "rbuttondown". Because, when i select the "rbuttondown" value from the DDLB, the script window is all blank, as in the screenshot below. Could you please help me point in a right direction? thanks a ton!!!!

Comment
There are no comments made yet.
Nick R Accepted Answer Pending Moderation
  1. Monday, 17 June 2019 15:35 PM UTC
  2. PowerBuilder
  3. # 3

Ty Chris, that helped me in searching the file with the DWO name. I double clicked to open the file from the search window and then navigated to that file. I do not see anything in the script window for "rbuttondown". I have noticed that, there is no pages/tabs bar at the bottom of the script page. I am not sure if i am looking at the right place. 

Could you please help me with pointing out what is DW/DWC/DWO from the screenshots below?

 

Comment
  1. Chris Pollach @Appeon
  2. Monday, 17 June 2019 16:53 PM UTC
Yes, the RHMB has code attached to it!

The blue colouring denotes that the PowerScript code is on an *ancestor* object. If you select the DDLB beside the Event Name, it will show you all the ancestor(s) and where the code resides based on their colouring.
  1. Helpful
There are no comments made yet.
Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Friday, 14 June 2019 21:25 PM UTC
  2. PowerBuilder
  3. # 4

Hi Nikhil ;

   Super easy to find the DWO => DWC assignment, as follows:

1) Use RHMB on your App's "Target" in the IDE's System Tree

2) Select "Search" from the pop-up menu

3) Enter the DWO name in the Search dialogue - then hit OK

4) Observe the Search Pane for the answer.

Tip: Double click on the line in the Search Pane that has the DWO => DWC answer and it will open the related object's painter for you.

 

Happy searching!

Regards ... Chris

Comment
There are no comments made yet.
Nick R Accepted Answer Pending Moderation
  1. Friday, 14 June 2019 20:27 PM UTC
  2. PowerBuilder
  3. # 5

Here is where i am stuck. I right click on this screen and get the options to print a report. Where is the right click functionality in the code for this screen? How do i search? thanks!

 

 

Comment
  1. Chris Pollach @Appeon
  2. Friday, 14 June 2019 20:56 PM UTC
Hi Nikhil ;

Ahhh .. you are *not* looking at a control. You are looking at a DataWindow *object* (DWO). The DWO would then be attached to a DW Control (DWC) which is designed especially to house DWO's. So you will need to locate the Window that houses the DWC that in turn houses the DWO. Using the RHMB on the DWC will then give you the option to enter the Script Pane. Once there, you will find the list of events like I showed you in the previous screen capture that I posted.

HTH

Regards ... Chris

  1. Helpful
  1. Nick R
  2. Friday, 14 June 2019 21:12 PM UTC
Lol, ty so much. now, i guess the question is, how do i identify the DataWindowControl for a DataWindowObject? then the specific window for both. thanks for the help Chris. I am learning PB with your knowledge sharing. Appreciate your patience!!
  1. Helpful
There are no comments made yet.
Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Friday, 14 June 2019 19:56 PM UTC
  2. PowerBuilder
  3. # 6

Hi Nikhil ;

  Basically ... when you are in any of PB's painters that handle "visual" objects - for example like a DataWindow Control - navigate to the Script Pane and then choose the "RbuttonDown" event from the top DDLB, as follows:

 

HTH

Regards ... Chris

Comment
There are no comments made yet.
Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Friday, 14 June 2019 18:59 PM UTC
  2. PowerBuilder
  3. # 7

Hi Nikhil ;

   Basically, every PB "Control" has an "RButtonDown" event. Most applications then use a PopMenu() command to display a popup menu to the user with the options their PB App(s) can support when this happens. Choosing a menu item from the PopMenu then fires the MenuItem's "clicked" event where you would now code the PowerScript code to perform the "action" your App requires at this point.

HTH

Regards .... Chris

Comment
  1. Nick R
  2. Friday, 14 June 2019 19:35 PM UTC
Hi Chris,



thanks for the quick response. I really appreciate. I am sorry to ask this dumb question. I am looking at the .pbl files and i have managed to navigate to the UI page in the code where, i right click to get the pop-up menu. I do not see the "Control" or "RButtonDown" option. Please guide me through. thanks!
  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.