PDFium Component Docs

LoadingText Właściwość

Ten wpis API zachowuje identyfikatory, sygnatury, bloki kodu i terminy PDF w oryginalnej postaci.
Komponent: TPdfView  ·  Moduł: PDFium
Tekst pokazywany na środku strony, gdy asynchroniczne renderowanie nadal trwa

Składnia

property LoadingText: string; // default 'Loading...'

Opis

LoadingText to napis, który przeglądarka nakłada na częściowo wyrenderowaną stronę, gdy AsyncRendering ma wartość True. Przeglądarka mierzy ciąg bieżącą dziedziczoną czcionką, rozwija wynik do wyśrodkowanego prostokąta, wypełnia go wartością LoadingColor, a następnie rysuje tekst na wierzchu. Domyślne 'Loading...' jest dla użytkowników czytelnym stanem przejściowym i ma dość szerokości, aby było widoczne bez dominowania nad stroną

The overlay is keyed off the text rather than off a separate visibility flag. Assigning an empty string ('') suppresses the overlay even while asynchronous rendering is active — useful when the host application wants to display its own loading widget (an animated GIF, a modal progress dialog, a separate status-bar panel) and would rather not have the built-in rectangle compete for attention.

Localise the string by assigning a translated resource at startup; the property accepts any string the host application can produce, including multi-byte characters such as Chinese, Japanese, or Arabic.

Uwagi

Przykład

// Localized loading caption.
PdfView1.AsyncRendering := True;
PdfView1.LoadingText := SLoadingPdf; // resourcestring lookup

// Suppress the built-in indicator; use a TActivityIndicator instead.
PdfView1.LoadingText := '';
ActivityIndicator1.Animate := True;

// Stage-specific message for slow first paint.
PdfView1.LoadingText := 'Decoding first page...';
PdfView1.Active := True;

Zobacz też

LoadingColor, AsyncRendering, Font, Active