1. Naveen M R
  2. PowerBuilder
  3. Wednesday, 1 April 2020 04:33 AM UTC

I am opening window using OpenWithParm function, I would like to insert window name into menu. How do I achieve this?

Thanks in advance.

Naveen M R Accepted Answer Pending Moderation
  1. Thursday, 2 April 2020 08:50 AM UTC
  2. PowerBuilder
  3. # 1

Sorry to ask, What should be the code inside the function mf_UpdateWName?

Comment
  1. Roland Smith
  2. Thursday, 2 April 2020 14:37 PM UTC
Example:



m_file.m_window.Text = as_name

  1. Helpful
  1. Naveen M R
  2. Friday, 3 April 2020 05:17 AM UTC
But I need to insert the menu item first and then I have to set the text. Not sure how to insert the menu item dynamically.
  1. Helpful
There are no comments made yet.
Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Wednesday, 1 April 2020 16:55 PM UTC
  2. PowerBuilder
  3. # 2

Hi Naveen;

    FYI:  This is done automatically for you if you use an MDI style application and then open the Window class using the OpenSheetWithParm() command.

Food for thought.

Regards ... Chris

Comment
  1. Naveen M R
  2. Thursday, 2 April 2020 08:52 AM UTC
For some requirement we are using OpenWithParm() function instead of OpenSheetWithParm().

And OpenWithParm doesn't add window name to menu item.
  1. Helpful
  1. Brad Mettee
  2. Thursday, 2 April 2020 14:00 PM UTC
OpenWithParm doesn't open MDI sheets, it opens normal window objects (like w_main, or w_resp_getinput).

Why do you want to add an open window, that's not in the MDI, to the MDI window list?
  1. Helpful
  1. Naveen M R
  2. Friday, 3 April 2020 05:27 AM UTC
That is the requirement from solutions.
  1. Helpful
There are no comments made yet.
Roland Smith Accepted Answer Pending Moderation
  1. Wednesday, 1 April 2020 15:24 PM UTC
  2. PowerBuilder
  3. # 3

1 Add a function to the menu object that takes Window Name as the argument and sets the menu item text property.

2 In the window open:

m_menuname lm_menu

lm_menu = this.MenuID

lm_menu.mf_UpdateWName("Window Name")

 

Comment
  1. Naveen M R
  2. Thursday, 2 April 2020 08:52 AM UTC
Sorry to ask, What should be the code inside the function mf_UpdateWName?
  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.