1. David Sternberg
  2. PowerBuilder
  3. Tuesday, 18 June 2019 14:53 PM UTC

parent.title    = is_title_initial + ' ' + is_id

After changing the window title in script appending an id, the window title under the window menu option doesn't change immediately.  It appears to change once another window is opened but that is a bit confusing.  Is there a best way to change / redraw the name in the menu dropdown from the script when the window title is changed?

David Sternberg Accepted Answer Pending Moderation
  1. Tuesday, 18 June 2019 17:51 PM UTC
  2. PowerBuilder
  3. # 1

Hi Chris,

No, I do believe so as I checked and I use SetRedraw sparingly and when I do it is very script contained.

The title change script is in a single line edit on a window open from another window (actually the title is changed in the open event and then again while the postopen event is running the single line edit script with a passed id to the window). The window title shows the change and I have four windows that show under the window menu item. The window titles with the added id do not show on the menu until I click a menu, then all four window menu names change in the drop down presto. It’s like the menu needs a redraw or acceptext but those are not menu functions. Hum, maybe a work around or I am missing something. I wonder if running in development mode will be diff then runtime.

Comment
  1. Chris Pollach @Appeon
  2. Tuesday, 18 June 2019 18:14 PM UTC
Can you post some screen captures of what you expect and see?
  1. Helpful
  1. Brad Mettee
  2. Wednesday, 19 June 2019 13:49 PM UTC
Chris

This is a long standing issue for us too. I think the issue started with PB12.5 (maybe 12, but we went from 10 to 12.5 directly, so not sure about that). We have an application with multiple MDI child windows that get their title built after being opened. The Window List is frequently wrong because of this, and occasionally has blank entries in it. This is still an issue in PB2017 (haven't tried PB2019 as an offline license can't be used on 2 diff products at the same time - yet another roadblock for devs).
  1. Helpful
  1. David Sternberg
  2. Wednesday, 19 June 2019 15:26 PM UTC
Oh boy, history I like, well kind of, misery loves company too. I just verified that the run time also has the same issue as in development mode. Very odd, activating another menu item or dragging one window, clicking on another window to get focus causes the menu item names to refresh. However, in the script late yesterday, I was unsuccessful "playing" trying to get the names to get updated. I am using R2017 B1681 (yes IK poo behind).
  1. Helpful
There are no comments made yet.
Olan Knight Accepted Answer Pending Moderation
  1. Tuesday, 18 June 2019 17:26 PM UTC
  2. PowerBuilder
  3. # 2

 

You could also place the title change code in the OPEN or PFC_PREOPEN event of the window.

Olan

Comment
  1. David Sternberg
  2. Wednesday, 19 June 2019 15:08 PM UTC
Yes I have code in the open event too but this change is after data input.
  1. Helpful
There are no comments made yet.
Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Tuesday, 18 June 2019 17:13 PM UTC
  2. PowerBuilder
  3. # 3

Hi David;

  Could you have a SetReDraw(FALSE) active somewhere when this title is being changed?

Regards ... Chris

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.