1. David Peace (Powersoft)
  2. PowerBuilder
  3. Monday, 8 November 2021 14:51 PM UTC

Hi Guys

I just spotted an anomaly with the Window width & height values stored in the exported SRW compared to the property values shown in the IDE.

I have a window that shows width 2706 and height 996 in the IDE properties, if I open edit source if has the following

global type w_m_corp_act_list from awm_list_noam_sel
integer width = 2743
integer height = 1176

I have another window showing width 2816 height 1548 in the IDE properties and edit source shows:

global type w_m_sse_settle_perform_status_details from awm_details_nosel
integer width = 2853
integer height = 1652

It's not as if the difference is a fixed number. Can anyone shed some light on how to calculate the values in the IDE from the source?

I’m writing some global scrips editing the source of an application and I need to identify objects that have been moved off the window (i.e. outside of the height or width) so in the example of the second window above I have objects with a Y coordinate of 1624 and are not visible to the user as a result, I need to identify these and set the visible property to false. When I read the source the height is 1652 and so the Y coordinate looks like its within the window.

What is the algorithm for calculating height & width in the SRW?

Cheers

David

Accepted Answer
Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Monday, 8 November 2021 15:37 PM UTC
  2. PowerBuilder
  3. # Permalink

Hi David;

   Width will be reported as Window width in Painter + current border size setting as per MS-Windows current settings

   Height will be reported as Window height in Painter + current border size + current windows title size setting as per MS-Windows current settings.

HTH

Regards ... Chris

Comment
  1. David Peace (Powersoft)
  2. Wednesday, 10 November 2021 13:44 PM UTC
Hi Chris

I assumed that, but would have expected the differences to be the same for all windows. But each window has a different variance to the IDE and Export. I gues I'll just have to use a finger in the air approach for best fit :)
  1. Helpful
There are no comments made yet.
Miguel Leeuwe Accepted Answer Pending Moderation
  1. Monday, 8 November 2021 18:47 PM UTC
  2. PowerBuilder
  3. # 1

Hi David,

I ran into similar problems some time ago.

Maybe there's some useful information here in the comments made by others: https://community.appeon.com/index.php/qna/q-a/how-to-determine-the-original-width-and-height-of-an-mdi-sheet-window

regards

Comment
  1. Mark Goldsmith
  2. Wednesday, 10 November 2021 14:12 PM UTC
Agreed, that would be helpful!
  1. Helpful
  1. René Ullrich
  2. Wednesday, 10 November 2021 14:20 PM UTC
The difference between stored windows size and window workspace is dependend on different settings: Border, Resizeable, Clientedge, Titlebar, PaletteWindow, Scrollbars, Menu.

You can find my code to get workspace size from values in exported source in a comment of the thread Miguel already posted. But I don't know whether this values are constant or dependend on windows settings.
  1. Helpful
  1. Miguel Leeuwe
  2. Wednesday, 10 November 2021 15:13 PM UTC
And ... most probably, if you still have users on windows 7 or windows 8, all of these values might vary. Can't wait for windows 11 :s

regards
  1. Helpful
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.