I am a relatively new coder to Xojo and relatively random user!
I have just upgraded an inherited application from 2016R4 to 2020R1.2 and, whilst I have managed to resolve some compilation issues, I have one that I just cannot fix!
I have a reportviewer that uses a canvas with scrollbars, and for some reason, the canvas now only partially displays.
The Canvas has a paint action that contains the following code:
Bit of a guess here as I donāt know if this is done using the reporting feature in xojo (which Iāve never used):
How does the canvas look when the window opens?
Does this only happen when you increase the width of the window at runtime?
In the IDE check the locking of the canvas so the right padlock is enabled so the canvas width alters when you make the window wider. Click the canvas then open the inspector and check this is locked.
It might also be that the canvas isnāt wide enough in the IDE at design time, at which point, set it to where you want it at design time, then click the right side padlock so it expands when/if you alter the window width at runtime.
Also, if the padlock is checked, check that that isnt in the child of something that isnt checked.
The canvas looks as per the image uploaded originallyā¦the final 3rd of the report is not showing. The background is white so Iām guessing that is the report as the final third is gray, as per the canvas within the designer.
All 4 padlocks on the canvas are locked. I have tried unlocking the right hand one and running the application without any changes appearing. As Iāve said previously, this issue has only occurred since recompiling the application with a later xojo compiler, the previous one being 2016!
I did have other issues with this relating to printed documents and specifically using scales. In order to get this sorted quickly, I have had to hardcode some numbers around the scale value (hate doing this but I have a customer who is chasing, Iāll try to resolve this at a later date!). I only mention this in case itās a related issue.
Isnāt the width of that white page the āsizeā of the paper chosen for the printer youāre using? E.g. if I set my default printer to my label printer, running the ListBoxReport example included with Xojo my white page size is tiny, but if I set my default printer to my A4 printer, the white portion is large, but it does have a right extent if I increase the size of the window.
Are you comparing the output from two different computers that have different printers set as default?
The scaling issue you mentioned could be the case as youāre limited by the size of the paper, maybe that code made things bigger/smaller so you could āseeā more on the page?
The application in question has a āSave Printer Settingsā option which I have just run, saving the default as A4, which was previously Letterā¦this resolved the issue! I also ran one of the reports where I had to hardcode the scaling and these still work so were actually unrelated!