- Miguel Leeuwe
- PowerBuilder
- Wednesday, 20 January 2021 03:50 PM UTC
Hi,
I'm having to apply vScroll and HScroll bars to a window on some big windows that we have which wouldn't fit an smaller screen resolutions. If the WorkSpaceHeight() is smaller than a certain values, I want to set the width and height of the window to it's 'original' value and show scrollbars.
As an example, I'm setting the width and height in the 'other' tabpage to 4000 and 2000.
The problem I'm having is obtaining the 'original' value from code:
Exported code PB 6.5:
global type w_genapp_sheet from Window
int X=672
int Y=264
int Width=4000
int Height=2000
boolean TitleBar=true
string Title="Sheet"
When running, the only difference I seem to get is in the height: a bit less, probably caused by the windows title occupying some space.
Exported code PB 12.6, PB 2017, PB2019:
global type w_genapp3_sheet1 from w_genapp3_basesheet
string tag = "Untitled for Sheet 1"
integer width = 4037
integer height = 2180
Then when I run the application, I'm getting these values:
Width 7333 and height 2548, pretty different from the specified values of 4000x2000.
If I set my 'windows scaling' to 125% I'm getting these values:
Is there any explanation for this? What I'm I missing?
Do I have to convert units to pixels and vice versa or something?
TIA
Find Questions by Tag
Helpful?
If a reply or comment is helpful for you, please don’t hesitate to click the Helpful button. This action is further confirmation of their invaluable contribution to the Appeon Community.