1. Olan Knight
  2. PowerBuilder
  3. Tuesday, 6 August 2019 22:16 PM UTC

PowerBuilder v12.1, b7055
Windows 7, 64 bit platform

I have a tabpage from which I open the response window lw_cascade".
The response window is a PowerBuilder window of type "response", not a framework or PFC object - straight PB.
The Center option is checked on the response window.

This is the call to open the response window:

    // Get the cascade options to use
    ll_rc = OPENWITHPARM (lw_cascade, lstr_options)

The response window is flickering when it opens because it FIRST opens in the upper left corner of the monitor, THEN the response window is centered.


I've tried adding "this.Visible = FALSE" in the following events, all to no avail:   activate, open, show.

I've tried un-checking the VISIBLE attribute of the window and manually specifying this.Visible = TRUE at the bottom of the OPEN event - which also fails.

Un-checking the CENTER attribute removes the flicker, but the window opens in the upper left corner of the monitor.


Is there any way to open the window centered WITHOUT the fllicker?


Thanks,

Olan

 

 

Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Wednesday, 7 August 2019 01:14 AM UTC
  2. PowerBuilder
  3. # 1

Hi Olan;

   If memory serves me correctly, this was a bug in PB12.1

Regards ... Chris

Comment
There are no comments made yet.
John Fauss Accepted Answer Pending Moderation
  1. Wednesday, 7 August 2019 02:24 AM UTC
  2. PowerBuilder
  3. # 2

You could try setting the response window's Visible property to False (as you have already tried), but instead of setting the property to True at the end of the Open event script, create a ue_PostOpen event in the window that will set the Visible property to True, then Post the event from the end of the Open event script.

If that doesn't work, add window centering logic to the ue_PostOpen event before setting the Visible property to True, and also turn the Center Window property off. If it is a bug in PB12.1's "centering" logic, this might circumvent it.

HTH

-john

Comment
There are no comments made yet.
Olan Knight Accepted Answer Pending Moderation
  1. Wednesday, 7 August 2019 14:01 PM UTC
  2. PowerBuilder
  3. # 3

Resolved.

Thanks, John & Chris.

John, your post led me in the correct direction.

1) I created an event called "ue_center_window()".

2) I posted a call to ue_ceneter_window() at the end of the OPEN event.

3) The "ue_center_window()" event consists of two lines of code:
             this.Center = TRUE
             this.Visible  = TRUE

It works, with no flickering!


Thank You Again,

Olan

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.