Search code examples
javaizpack

How to set font color on User Input file field of IzPack?


How could I set the color in the follow field message? The text "Please enter the Jboss directory name." should appear in red.

<field type="staticText" align="left" txt="Please enter the Jboss directory name."  conditionid="con_jboss_installed"/>

Solution

  • Looking at the sources, the description field supports HTML rendering (it is looking for and at the beginning and end of the text), so the following is supposed to work:

    <field type="staticText" align="left" conditionid="con_jboss_installed">
      <description><html><body><p style="color: red;">Please enter the Jboss directory name.</p></body></html></description>
    </field>
    

    This would require IzPack 5.