GitLab Commit is coming up on August 3-4. Learn how to innovate together using GitLab, the DevOps platform. Register for free: gitlabcommitvirtual2021.com

Commits (10)
......@@ -192,7 +192,7 @@ Static Private Sub SearchTheme(sDesktop As String)
Select sDesktop
Case "gnome"
Case "gnome", "cinnamon"
If Not sTheme Then Try Exec ["gconftool-2", "-g", "/desktop/gnome/interface/icon_theme"] To sTheme
......
# Gambas Project File 3.0
Title=ReportsEvolution
Startup=Report13
Startup=Module2
Icon=.hidden/control/reportview.png
Version=3.15.90
VersionFile=1
......
......@@ -82,6 +82,8 @@ Property Orientation As Integer
Property Read _Width As Float
Property Read _Height As Float
Property Path As String Use $sPath
Event Open
Static Public Sub Main()
......@@ -322,9 +324,9 @@ End
'
Public Function Preview()
If Me.Path Then FPreview.Path = Me.Path
FPreview.Run(Me)
If FPreview.Path Then Me.Path = FPreview.Path
End
......
' Gambas module file
Public Sub main()
Dim hreport As New Report13
hreport.Path = User.Home &/ "Test.pdf"
hreport.Preview
Print hreport.Path
End
......@@ -7,6 +7,8 @@ Private $hPrinter As New Printer As "Printer"
Private $bVerif As Boolean
Private $bPrinting As Boolean
Private $iFileRes As Integer = 150
Static Property Path As String Use $sPath
Static Public Function Run(hReport As Report)
......@@ -88,6 +90,7 @@ Private Sub GetValuesFromReport()
spHeight.Value = $hPrinter.PaperHeight
Object.Unlock(spHeight)
End
Public Sub sldZoom_Change()
......@@ -404,6 +407,9 @@ Public Sub Form_Close()
Settings.Save()
Endif
FPreview.Path = IIf(tabPrint.Index = 1, txtFile.Text, "")
End
Public Sub Form_Open()
......@@ -447,6 +453,13 @@ Public Sub Form_Open()
btnOnePage.Value = True
tabPrint_Click
If FPreview.Path And If Not IsDir(FPreview.Path) Then
tabPrint.Index = 1
txtFile.Text = FPreview.Path
Endif
End
Public Sub btnZoomIn_Click()
......