DocumentViewer: Fit-To-Page for RichEditControl
This commit is contained in:
@@ -6,6 +6,7 @@ Imports Independentsoft.Msg
|
||||
Imports DevExpress.Spreadsheet
|
||||
Imports GdPicture14
|
||||
Imports DevExpress
|
||||
Imports DevExpress.Office.Utils
|
||||
|
||||
Public Class DocumentViewer
|
||||
Private Enum ZoomMode
|
||||
@@ -535,4 +536,10 @@ Public Class DocumentViewer
|
||||
MagnifierToolStripMenuItem.Checked = True
|
||||
GdViewer.Focus()
|
||||
End Sub
|
||||
|
||||
Private Sub RichEditControl1_SizeChanged(sender As Object, e As EventArgs) Handles RichEditControl1.SizeChanged
|
||||
Dim oControlWidth = RichEditControl1.Width - 100
|
||||
Dim oPageWidth = Units.DocumentsToPixelsF(RichEditControl1.Document.Sections(0).Page.Width, RichEditControl1.DpiX)
|
||||
RichEditControl1.Views.PrintLayoutView.ZoomFactor = oControlWidth / oPageWidth
|
||||
End Sub
|
||||
End Class
|
||||
|
||||
Reference in New Issue
Block a user