1. Robert Sawyer
  2. PowerBuilder
  3. Friday, 7 June 2024 19:20 PM UTC

I have a window name w_menu_holder

I want to create the window from thje string "w_menu_holder"

Is it possible to do so?

This is what I am trying that doesn't work.

 


window lw_window // Declare a window variable
string ls_window
ls_window = 'w_menu_holder'
// Dynamically create an instance of the window using the string name
lw_window = Create using ls_window
Open (lw_window)

Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Friday, 7 June 2024 19:42 PM UTC
  2. PowerBuilder
  3. # 1

Hi Robert;

  You were on the right track but your code is a bit off. Here is what you should be using ...

Int	li_rc	// Return code
window	lw_window   // Pointer 
string	ls_window = 'w_menu_holder'  // Name 2 open	
li_rc	= Open (lw_window, ls_window)

HTH

Regards .. Chris

Comment
  1. Robert Sawyer
  2. Friday, 7 June 2024 21:09 PM UTC
This worked great - thank you again for taking the time to help - very appreciated
  1. Helpful
  1. Chris Pollach @Appeon
  2. Friday, 7 June 2024 21:13 PM UTC
Excellent .. that is great news Robert!

You are most welcome. ;-)
  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.