Hello,
I have run in to an odd error.
I have a common grid. It has been placed on a pageframe class. It is used only in one form, multiple times on that form. The hierarchy: grid is on a page of a pageframe, on a container, on a page of a pageframe, on a page of a pageframe, on a form.
For some reason, when a user has configured their system to 350% DPI I get this error. "Grid - Height : Expression evaluated to an illegal value"
I've added a method "height_assign" to capture things.
So the new value is 58, the current value is 94. The parent Pageframe height is 131.
The call stack suggests it is during form instantiation, before the Form INIT. Yet this one complicated form is the only form we've seen this error on.
Does anyone have some thoughts about what to try?
Thank you, Tracy
Maybe the size of the font used in the header object is too large when the size of the grid is 58 high?
Fred
On Mon, Feb 27, 2017 at 11:10 AM, Tracy Pearson tracy@powerchurch.com wrote:
Hello,
I have run in to an odd error.
I have a common grid. It has been placed on a pageframe class. It is used only in one form, multiple times on that form. The hierarchy: grid is on a page of a pageframe, on a container, on a page of a pageframe, on a page of a pageframe, on a form.
For some reason, when a user has configured their system to 350% DPI I get this error. "Grid - Height : Expression evaluated to an illegal value"
I've added a method "height_assign" to capture things.
So the new value is 58, the current value is 94. The parent Pageframe height is 131.
The call stack suggests it is during form instantiation, before the Form INIT. Yet this one complicated form is the only form we've seen this error on.
Does anyone have some thoughts about what to try?
Thank you, Tracy
[excessive quoting removed by server]
Fred Taylor wrote on 2017-02-27:
Maybe the size of the font used in the header object is too large when
the
size of the grid is 58 high?
Fred
Fred,
I thought of that. Now I went a little further. Sysmetric(8) && Height of Horizontal Scrollbar arrows is 60.
I don't see what is causing the number to be 58. I put code in place to account for that possible issue.
Works at 350% not at 500%. I have the code wrapped in a try/catch and it isn't acting like I have it in a try catch. It has put me in a foul mood. I'm going to take a break, get some food, and look at this again later.
Tracy Pearson PowerChurch Software
Perhaps you'll need to determine the bounds and then add an assign method to keep it from crossing the line? Doesn't feel very elegant, I know but...
--
rk -----Original Message----- From: ProfoxTech [mailto:profoxtech-bounces@leafe.com] On Behalf Of Tracy Pearson Sent: Monday, February 27, 2017 2:15 PM To: profoxtech@leafe.com Subject: RE: Grid - Height : Expression evaluated to an illegal value
Fred Taylor wrote on 2017-02-27:
Maybe the size of the font used in the header object is too large when
the
size of the grid is 58 high?
Fred
Fred,
I thought of that. Now I went a little further. Sysmetric(8) && Height of Horizontal Scrollbar arrows is 60.
I don't see what is causing the number to be 58. I put code in place to account for that possible issue.
Works at 350% not at 500%. I have the code wrapped in a try/catch and it isn't acting like I have it in a try catch. It has put me in a foul mood. I'm going to take a break, get some food, and look at this again later.
Tracy Pearson PowerChurch Software
Richard Kaye wrote on 2017-02-27:
Perhaps you'll need to determine the bounds and then add an assign method
to keep it from crossing the line? Doesn't feel very elegant, I know but...
I have tracked this down to be Scrollbar Height related. I specifically changed the HKEY_CURRENT_USER\Control Panel\Desktop\WindowMetrics\ScrollHeight value to -1155. See http://winaero.com/blog/how-to-change-the-size-of-scrollbars-in-windows-10/ for details.
That is 77 pixel. Which 450% DPI adjusted that value to. (determined via SysMetric(8))
So with the DPI settings still at 100%, and the ScrollHeight and ScrollWidth set to 77 pixels. I get the error. The grid is set to not have the horizontal scrollbar, yet the error is specifically with the height. The Height of the grid set in the properties is 76.
I have code in the Height_Assign like this: LPARAMETERS vNewVal TRY THIS.Height = vNewVAl CATCH ENDTRY
And yet, it still errors. Before the INIT of the grid code fires. And just some additional information. This complex form is usually run once by a user during the initial setup of the system. It has 34 grids nested in nested pageframes. It took until I set the Scrollbars to 73 pixels before it didn't error.
Just sharing my results in hopes it will help another in the future. May all your grids be > 90 pixels in height. To accommodate the 4K monitors and site challenged users.
DPI Setting, Horizontal Scrollbar Height 500, 85 450, 77 400, 68 350, 60 300, 51
Tracy Pearson PowerChurch Software
It seems that at normal 100% font size, the limit for Grid.Height is minimum 20. So the 58 is less than 3.5 * 20 (70) ?
Fred
On Mon, Feb 27, 2017 at 11:10 AM, Tracy Pearson tracy@powerchurch.com wrote:
Hello,
I have run in to an odd error.
I have a common grid. It has been placed on a pageframe class. It is used only in one form, multiple times on that form. The hierarchy: grid is on a page of a pageframe, on a container, on a page of a pageframe, on a page of a pageframe, on a form.
For some reason, when a user has configured their system to 350% DPI I get this error. "Grid - Height : Expression evaluated to an illegal value"
I've added a method "height_assign" to capture things.
So the new value is 58, the current value is 94. The parent Pageframe height is 131.
The call stack suggests it is during form instantiation, before the Form INIT. Yet this one complicated form is the only form we've seen this error on.
Does anyone have some thoughts about what to try?
Thank you, Tracy
[excessive quoting removed by server]