Solved

Creating Datawindow Control in PB

Posted on 2000-03-03
2
459 Views
Last Modified: 2010-05-19
Can we create a datawindow control dynamically in Power Builder 6.0 and above. If it is yes how to create it?
0
Comment
Question by:murugaiah
2 Comments
 
LVL 9

Expert Comment

by:david_levine
ID: 2583118
Wouldn't it be acceptable to create a datawindow in your app and change it programmatically?

What needs to be dynamic?
0
 
LVL 2

Accepted Solution

by:
jkotek earned 15 total points
ID: 2592518

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:

w_main.OpenUserObject(idw_data,"datawindow",100,200)

do idw_data.settransobject(), idw_data.retrieve() or what ever you want to do.
0

Featured Post

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Entering time in Microsoft Access can be difficult. An input mask often bothers users more than helping them and won't catch all typing errors. This article shows how to create a textbox for 24-hour time input with full validation politely catching …
These days, all we hear about hacktivists took down so and so websites and retrieved thousands of user’s data. One of the techniques to get unauthorized access to database is by performing SQL injection. This article is quite lengthy which gives bas…
Video by: Steve
Using examples as well as descriptions, step through each of the common simple join types, explaining differences in syntax, differences in expected outputs and showing how the queries run along with the actual outputs based upon a simple set of dem…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question