Discussions
Sign In
•
Register
Howdy, Stranger!
It looks like you're new here. If you want to get involved, click one of these buttons!
Sign In with LMD account
Sign In with LMD account
Categories
Recent Discussions
Categories
All Categories
1.1K
NG Controls
28
Announcements
60
LMD IDE-Tools
209
LMD ElPack
373
LMD-Tools
414
Feature Requests
38
In this Discussion
Eugene Balabuev (LMD)
December 2023
gregory pannet
December 2023
LMD RichPack
gregory pannet
December 2023
in
LMD ElPack
Vote Up
0
Vote Down
Zoom property does not work! Unable to zoom in on text box.
Value: -64..64??? Why are the values not in percentage %
The PageMagins (Bottom, Top) property is not supported.
it does not work.
how to resolve this problem?
THANKS
Comments
3 Comments
sorted by
Votes
Date Added
Eugene Balabuev (LMD)
December 2023
Posts: 0
Accepted Answer
Vote Up
1
Vote Down
Zoom property works in according to Microsoft's documentation: "
Sets the zoom ratio for a multiline edit control or a rich edit control. The ratio must be a value between 1/64 and 64".
Zoom vaues -1, +1 and 0 - are actually the same zoom.
PageMagins (Bottom, Top) issue - confirmed, fixed.
gregory pannet
December 2023
edited December 2023
Posts: 22
Vote Up
0
Vote Down
The solution to zoom the text box :
{ GetZoom }
function
GetZoom
: Integer;
var
wp, lp: integer;
begin
Result := 100;
SendMessage( LMDRichedit.Handle, EM_GETZOOM, Integer(
@wp
), Integer(
@lp
) );
if ( lp > 0 ) then
Result := MulDiv(100, wp, lp);
end;
{ SetZoom }
procedure
SetZoom
(const LMDRichEdit: TLMDCustomRichEdit;
const Value: Integer);
const
EM_SETZOOM = (WM_USER + 225);
begin
SendMessage(LMDRichEdit.Handle, EM_SETZOOM, Value, 100);
end;
{ ZoomIn Click }
procedure TFxxxx.ZoomInClick(Sender: TObject);
var
Zoom: Integer;
begin
Zoom :=
GetZoom
;
if Zoom < 200 then
Inc(Zoom, 10); // Inc Zoom +10%
SetZoom
(LMDRichEdit, Zoom);
end;
gregory pannet
December 2023
Posts: 22
Vote Up
0
Vote Down
Thank you
Sign In
or
Register
to comment.
Comments