• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 534
  • Last Modified:

Creating Datawindow Control in PB

Can we create a datawindow control dynamically in Power Builder 6.0 and above. If it is yes how to create it?
1 Solution
Wouldn't it be acceptable to create a datawindow in your app and change it programmatically?

What needs to be dynamic?

Yes, it is possible using the OpenUserObject window function.

windowname.OpenUserObject ( userobjectvar, userobjecttype {, x, y } )

You have to store the userobjectvar variable for further refference to the opened DataWindow control. The opened object can be in fact any descendant of dragobject - a command button, picture or datawindowcontrol. You only have to specify the type of object in string userobjecttype.

Here is the example:

let there be an instance variable idw_data of type datawindow, that will serve us as a refference to the newly opened DataWindow.

somewhere in the script execute:


do idw_data.settransobject(), idw_data.retrieve() or what ever you want to do.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Build your data science skills into a career

Are you ready to take your data science career to the next step, or break into data science? With Springboard’s Data Science Career Track, you’ll master data science topics, have personalized career guidance, weekly calls with a data science expert, and a job guarantee.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now