1. Sivaprakash BKR
  2. PowerBuilder
  3. Monday, 4 November 2024 07:49 AM UTC

Hello,

Any version of PB.  Currently developing in PB 2022 R3 build 3356

I want to open two instances of a window, side-by-side, so that I can view two different data in the same page(?).   We maintain history of data (insert, delete, update) in a separate table.  Sometimes, we need to inspect what was there in earlier version of the same data.   To facilitate I thought of opening two windows side by side, with the same set of datawindows, by passing two different retrieval arguments.    Is this possible?

Or is there any smarter way to achieve this?

Happiness Always
BKR Sivaprakash

 

Sivaprakash BKR Accepted Answer Pending Moderation
  1. Tuesday, 5 November 2024 05:16 AM UTC
  2. PowerBuilder
  3. # 1

Thanks René Ullrich.

Now I'm trying to implement your concept to my real world application.  My application is

1.  MDI application.  I need to use OpensheetWithParm instead of OpenWithParm
2.  I used resize utility from PFC without PFC, which fills up the window fully.   Now I need to modify this to take half space and side (left or right).  As I need to use the same window to open side by side
3.  I need to make invisible few objects in the window, when opened side by side.  On normal open, I need all the objects.  This has to be taken care.

That's all coming to mind as of now.  Hope OpenSheetWithParam will also work the same way as you mentioned.  

If there is anything else I need to take care of, kindly let me know.

Happiness Always
BKR Sivaprakash

 

Comment
There are no comments made yet.
René Ullrich Accepted Answer Pending Moderation
  1. Monday, 4 November 2024 08:49 AM UTC
  2. PowerBuilder
  3. # 2

Yes, of course it is possible.

To open two instances of same window you have to use the Open functions without using the window class name as first parameter. Use a variable instead.

e.g.

w_mywindow lw_first, lw_second
openwithParm (lw_first, "first")
openwithparm (lw_second, "second")

You can use the move function to specify the position of the windows. e.g.

lw_first.Move (0, 0)
lw_second.Move (lw_first.width, 0)

 

HTH, 

Renè

Comment
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.