ComponentOne VSView 8.0
ExportNavBar Property

Returns or sets the HTML template to be used for the navigation bar in paged HTML export files.

Syntax

[form!]VSPrinter.ExportNavBar(Position As Integer)[ = value As String ]

Remarks

This property is used in conjunction with the ExportFile and ExportFormat properties.

When exporting paged HTML files (by setting the ExportFormat to vpxPagedHTML or vpxPagedDHTML), the control creates several HTML files with links that allow the user to navigate to the first, previous, next, or last page in the sequence. The ExportNavBar property allows you to modify the template used to create these links.

The ExportNavBar property is indexed. Element zero defines the template used to generate the navigation bar at the top of each HTML page. Element one defines the template used to generate the navigation bar at the bottom of each HTML page.

By default, the ExportNavBar property has the following values:

' no navigation bar on the top of each page

ExportNavBar(0) = ""

' simple navigation bar on the bottom of each page

ExportNavBar(1) = "<!-- navbar beg -->" & _

"<p><font face=Arial size=2><b>" & _

"<a%s>[&lt;&lt;]</a> <a%s>[&lt;]</a>" & _

"&nbsp;&nbsp; Page %d of %d &nbsp;&nbsp;" & _

"<a%s>[&gt;]</a> <a%s>[&gt;&gt;]</a>" & _

"</b></font></p>" & _

"<!-- navbar end -->"

Notice that the template consists mostly of plain HTML, but is contains six special elements which serve as placeholders (they are shown above in bold). The first two elements "%s" are replaced with links to the first and last pages in the sequence. The middle two "%d" are replaced with the current and last page numbers. The last two "%s" are replaced with links to the next and last pages.

When creating your own templates, make sure you include all six placeholders and that they are in the proper order, or the navigation bar may not be created properly.

The following code shows some HTML navigation bar templates:

Select Case iNavStyle

Case 1 ' Plain

.ExportNavBar(0) = _

"<hr><p><font face=Courier size=2><a%s>[first]</a> <a%s>[prev]</a>" & _

"&nbsp;&nbsp; This is the top of page %d of %d &nbsp;&nbsp;" & _

"<a%s>[next]</a> <a%s>[last]</a></font></p>"

.ExportNavBar(1) = .ExportNavBar(0)

Case 2: ' White on black

.ExportNavBar(0) = "<p style=""background-color:black"";>" & _

"<font face=Wingdings size=2 color=white><b> " & _

"<a%s style=""color:white"">çç</a> " & _

"<a%s style=""color:white"">ç</a> </b></font>" & _

"<font face=Tahoma size=2 color=white>|<b>&nbsp;&nbsp;&nbsp;" & _

"Page %d of %d&nbsp;&nbsp;&nbsp;&nbsp;</b>|</font>" & _

"<font face=Wingdings size=2 color=white><b> " & _

"<a%s style=""color:white"">è</a> " & _

"<a%s style=""color:white"">èè</a> </b></font>" & _

"</p>"

.ExportNavBar(1) = .ExportNavBar(0)

End Select

Data Type

String

 

 


Copyright (c) GrapeCity, inc. All rights reserved.

Product Support Forum  |  Documentation Feedback