Forum > LazReport
Inches instead of mm
rvk:
--- Quote from: Thaddy on February 26, 2024, 12:08:29 pm ---2.54 is helpful if you know your math. you do not need a calculator for that, it least i don't. :o
--- End quote ---
It also wasn't the question.
But I didn't expect any less of you 🤡
Josh:
2.54 cm to 1 inch true, OP is talking in mm so 25.4mm to 1inch. to be imperialistic
rvk:
--- Quote from: SandyG on February 25, 2024, 07:49:32 pm ---Was doing to page setup from a report and see that everything is in mm. Any options to have this in inches?
--- End quote ---
Question is clear. It's not about calculation but about the option to show everything in inches.
It's not possible. The page option uses a string resource in "mm" and a function to do mm to pixels. This could be changed but there is currently no option to do it simply via setting a property to inches.
(Changes would involve changing the resourcestring and overriding the call to do inches to pixels.)
cdbc:
Hi
Just a wild shot in the dark... Couldn't one perhaps define a 'Helper' for this?!?
My 2 cents
Regards Benny
rvk:
--- Quote from: cdbc on February 26, 2024, 01:04:23 pm ---Just a wild shot in the dark... Couldn't one perhaps define a 'Helper' for this?!?
--- End quote ---
It would be a great option. Problem is that LazReport isn't programmed very modular.
The lrpgopt.pas, where the page options are, has labels and edits which are accessed directly (yikes), and it is called by lt_view (TfrPreviewForm).
The TfrPreviewForm.PageSetupBtnClick, where the "Margins.Left := MMStrToPoints(E3.Text);" is done, isn't overridable.
So it would involve at least changing the source of LazReport itself (or inheriting TfrPreviewForm and reprogramming the whole thing). You could use the bare boned preview without buttons and program your own page dialogs with inches. But OP already stated it isn't that big of a problem so probably this would be overkill (in this case). It is something others, who really do need inches, to take into account when using LazReport.
It was strange to see the Units ruInches. But it only seems to be in the designer and doesn't get used very much (at least not in the dialogs).
Navigation
[0] Message Index
[#] Next page
[*] Previous page