HTMLInfoPanel
Usage
A panel for showing HTML-formatted content.
This can be used for instance to show a 'README' content. It presents text of any length. The text is specified by the HTMLInfoPanel.info resource.
To add an image to the HTMLInfoPanel you simply need to add a ressource to your install.xml with an ID decided by you, then you can call this image by refering it by this same ID.
In install.xml:
<resources> <res src="logo.jpg" id="GHGHGH"/> .....
and in file.html:
<img src="GHGHGH"/>
Note that variables are being substituted in HtmlInfoPanel (e.g., $INSTALL_PATH will be replaced with the installation path).
You can define multiple HTMLInfoPanel with individual HTML texts by giving them a specific id. The resources must be named HTMLInfoPanel.<panelid> :
<resources> <res id="HTMLInfoPanel.readme" src="readme.html"/> <res id="HTMLInfoPanel.disclaimer" src="disclaimer.html"/> ... </resources> ... <panels> <panel classname="HTMLInfoPanel" id="readme" /> <panel classname="HTMLInfoPanel" id="disclaimer" /> ... </panels>
Since 5.0.7:
For the console installation mode, the info text can be preformatted for displaying using the following features:Â Â
- Word wrap
If there are long lines in the text containing more characters than the real terminal width, the text is not broken accidentally at the terminal border, but it is wrapped by words.
Exception: Single words which are longer than the terminal width are broken at the terminal line end. Paging
If the info text results in more lines (after the word wrapping mentioned above) than the real terminal height, the text is paged, e.g. there is displayed one page fitting the terminal dimensions and below there is shown a===More===
line indicating there are more pages of text available. The next page is shown when pressing the SPACE (or any other key) here.Â
ConfigurationÂ
The word wrap and paging feature described above must be activated depending on the format of the info text, they are deactivated by default.Â
Panel configuration parameter | Possible values | Default | Description |
---|---|---|---|
console-text-wordwrap | true | false | false | Set "true" in order to activate word wrapping for the displayed text in console installation mode. Since: 5.0.7 |
console-text-paging | true | false | false | Set "true" in order to activate paging for the displayed text in console installation mode. Since: 5.0.7 |
Example:
<panels> <panel classname="HTMLInfoPanel" id="panel.info"> <configuration> <param name="console-text-paging" value="true" /> <param name="console-text-wordwrap" value="false" /> </configuration> </panel> ... </panels>Â
The two options work independently on each other. If there are both activated, word wrapping is done before calculating the page size for paging.
Labels/Messages
id | Description |
---|---|
InfoPanel.info | The label text to be shown as panel label above the contents |
Resources
id | Description |
---|---|
HTMLInfoPanel.<panel id> | HTML file resource - the HTML-formatted text to be shown as panel content. If you don't specify the panel id then pane id is assumed to be info (i.e. the resource id will be HTMLInfoPanel.info). |
Limitations
The panel id is not taken into account for the panel label, they key is always taken as InfoPanel.info. The label InfoPanel.info is shared with InfoPanel as well.