Page 1 of 1

Disable automatic scaling when resizing

Posted: Wed Nov 21, 2007 7:47 pm
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.

Posted: Thu Nov 22, 2007 12:16 am
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.

Posted: Thu Nov 22, 2007 3:28 am
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.

Posted: Thu Nov 22, 2007 9:50 am
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.

Posted: Thu Nov 22, 2007 2:39 pm
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?

Posted: Thu Nov 22, 2007 2:50 pm
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.

Posted: Thu Nov 22, 2007 3:45 pm
by emo
Thanks a lot for answers.