Disable automatic scaling when resizing

ScaleRichView support and discussion (TRichView add-on for WYSIWYG editing)
Post Reply
emo
Posts: 8
Joined: Wed Nov 21, 2007 7:40 pm

Disable automatic scaling when resizing

Post by emo »

Hi.
Is there a way to disable scaling (zooming) of document content when we resize it. I could not find that. Personally I prefer behavior of content of RichView on resizing and want to set scaling (zoom) manually.
proxy3d
ScaleRichView Developer
Posts: 307
Joined: Mon Aug 07, 2006 9:37 am

Post by proxy3d »

If (ScaleRichView. ViewProperty. ZoomMode = rvzmCustom) the scale of the document will not change and it will be equal to value (ScaleRichView. ViewProperty. ZoomPercent). By default (ScaleRichView. ViewProperty. ZoomMode = rvzmPageWidth), in this mode value the scale (ScaleRichView. ViewProperty. ZoomPercent) depends on width of a component and changes automatically.

ScaleRichView.ViewProperty.ZoomMode := rvzmCustom;
or If (ScaleRichView.ViewProperty. ZoomPercent := XXX;), then value ScaleRichView.ViewProperty.ZoomMode changes automatically and it will be equal rvzmCustom.
emo
Posts: 8
Joined: Wed Nov 21, 2007 7:40 pm

Post by emo »

Hi Ilya.
I already tried that property. I did it in demo ActionTest.Set ZoomMode:=rvzmCustom in IDE, then just added one Button and onClick increased width:=width+10 of component and saw changing of scale(zoom). But then I noticed that ZoomMode have been changed to rvzmPageWidth (may be somewhere in code). So let's go ahead. :)

But can we have behavior of RichView when we resize component? Now if we set rvzmCustom and resize then nothing happens with content. It just changes positions of "internal" document and not its width and accordingly not content showing.
Sergey Tkachenko
Site Admin
Posts: 17559
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post by Sergey Tkachenko »

But if content width is changed when resizing without scaling, it would not be WYSIWYG.
This mode is implemented as "Web mode" in demos.
emo
Posts: 8
Joined: Wed Nov 21, 2007 7:40 pm

Post by emo »

Sergey Tkachenko wrote:But if content width is changed when resizing without scaling, it would not be WYSIWYG.
Why? I see content with changed width and I get it. What does break WYSIWYG concepts?
Sergey Tkachenko wrote:This mode is implemented as "Web mode" in demos.
Which demo?
Sergey Tkachenko
Site Admin
Posts: 17559
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post by Sergey Tkachenko »

In WYSIWYG mode, page looks exactly like it will be printed. Lines on screen are wrapped exactly at the same places as on paper. Wrapping does not depend on the editor's window width.

Several ScaleRichView demos allow switching between 3 layouts: normal mode, web mode, page-view mode. You can see buttons in the bottom left corner, like in MS Word. For example, in RichViewActions demo.
In web mode, document always occupies the full width, and lines are wrapped like in TRichView.
emo
Posts: 8
Joined: Wed Nov 21, 2007 7:40 pm

Post by emo »

Thanks a lot for answers.
Post Reply