[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: DocumentView confusion
[Thread Prev] | [Thread Next]
- Subject: Re: DocumentView confusion
- From: Fabien Bodard <gambas.fr@xxxxxxxxx>
- Date: Sun, 16 Nov 2025 22:05:12 +0100
- To: user@xxxxxxxxxxxxxxxxxxxxxx
The Page parameter in _Layout and _Draw... is the real page number. Maybe I need to correct the Other properties to use only real page numbers and not indexing... But I'm afraid about back compatibility Le dim. 16 nov. 2025 à 22:01, Fabien Bodard <gambas.fr@xxxxxxxxx> a écrit : > '' Return the index of the first visible page. > Property Read FirstVisiblePage, FirstVisibleDocument As Integer > > '' Return the index of the last visible page. > Property Read LastVisiblePage, LastVisibleDocument As Integer > > FirstVisibleDocument and LastVisibleDocument are aliases > for FirstVisiblePage and LastVisiblePage > > These parameters are just the value of the partially drawn pages. They are > in fact used by the event manager to call pictures that need to be drawn. > > The component remembers the content unless the zoom is used. in this case > the drawing need to be refreshed. > > > Private $hPdf As PdfDocument > > Public Sub Button1_Click() > > If Not Dialog.OpenFile() Then > > $hPdf = New PdfDocument(Dialog.Path) > DocumentView1.Count = $hPdf.Count > Endif > > End > > Public Sub DocumentView1_Layout(Page As Integer) > > Last.Layout.Width = $hPdf[Page].W > Last.Layout.Height = $hPdf[Page].H > > End > > Public Sub DocumentView1_Draw(Page As Integer, Width As Integer, Height As > Integer) > > Paint.DrawImage($hPdf[Page].Render(0, 0, Width, Height), 0, 0) > > End > > > -- Fabien Bodard
| Re: DocumentView confusion | Lee <t.lee.davidson@xxxxxxxxx> |
| Re: DocumentView confusion | gbWilly <gbWilly@xxxxxxxxxxxxxx> |
| DocumentView confusion | gbWilly <gbWilly@xxxxxxxxxxxxxx> |
| Re: DocumentView confusion | Lee <t.lee.davidson@xxxxxxxxx> |
| Re: DocumentView confusion | gbWilly <gbWilly@xxxxxxxxxxxxxx> |
| Re: DocumentView confusion | Lee <t.lee.davidson@xxxxxxxxx> |
| Re: DocumentView confusion | Fabien Bodard <gambas.fr@xxxxxxxxx> |
| Re: DocumentView confusion | gbWilly <gbWilly@xxxxxxxxxxxxxx> |
| Re: DocumentView confusion | Gianluigi <gradobag@xxxxxxxxxxx> |
| Re: DocumentView confusion | Gianluigi <gradobag@xxxxxxxxxxx> |
| Re: DocumentView confusion | Lee <t.lee.davidson@xxxxxxxxx> |
| Re: DocumentView confusion | Gianluigi <gradobag@xxxxxxxxxxx> |
| Re: DocumentView confusion | Fabien Bodard <gambas.fr@xxxxxxxxx> |