Hyperlink
The Hyperlink () form object provides the possibility to add a hyperlink to a web page with additional or related information.
Enter the name of the hyperlink object in the Name field.
In the Text field, enter the text that appears in the form as a clickable hyperlink.
In the URL field, enter either a valid web address or an email address.
A valid web address, such as www.comsol.com, does not normally need the https:// or http:// prefix. The web page will open in the user’s default browser.
For email addresses, use the mailto format, such as mailto:info@comsol.com, to provide a hyperlink for sending an email. It can also include a specified subject and message body. The hyperlink will launch the user’s default email application program and prepare a new message, where the To field is set to the specified address. Note that this way of interactively sending an email from a COMSOL application differs from using the built-in email method.
The Settings window contains the following sections.
Position and Size
This section contains all layout settings for a hyperlink object in the grid of the parent form.
In the grid mode, you can control the horizontal and vertical alignment of the hyperlink object using the following lists:
From the Horizontal alignment list, choose Left, Center, Right, or Fill, which automatically expands the form object to fill the cell in the horizontal or vertical direction (where applicable).
From the Vertical alignment list, choose Middle, Top, Bottom, or Fill, which automatically expands the form object to fill the cell in the horizontal or vertical direction (where applicable).
The need to specify the alignment is most obvious when working in the grid mode, as it controls how the form object is aligned in its grid cell. Aligning the form object can be useful in the sketch mode too, and you can then use the alignment tools on the Arrange menu in the Form toolbar’s Sketch section. When running the application in any client other than the Windows client, the form objects may not be positioned exactly as seen in the form windows. This is because the form objects may have a different size in other clients, giving them a slightly different positioning. Specifying the alignment ensures that the form objects are aligned as you want them to be in all clients.
You can also specify the width and height of the hyperlink object. Enter a width (in points) in the Width field and a height (in points) in the Height field. If you chose Fill from the Horizontal alignment list, you can instead specify a Minimum width. Choose Automatic to compute the minimum width automatically (typically, this means a minimum size of 0) or choose Manual to specify a minimum width in the text field underneath. If you have chosen Fill from the Vertical alignment list, you can instead specify a Minimum height. Choose Automatic to compute the minimum height automatically (typically, this means a minimum size of 0) or choose Manual to specify a minimum height in the text field underneath.
Additionally, in the sketch mode, you can specify the absolute position of the hyperlink object using the Position x and Position y fields. In the grid mode, you can position the object in the grid and see the grid position as the Row, Column, Row span, and Column span values.
Cell Margin
Under Cell margin (in grid mode only), you can control the margins around the hyperlink object. By default, the margins are taken from the parent form. From the Cell margin list, choose:
None, for no margin around the form object.
From parent form (the default), to use the margins set for the parent form.
Custom, to specify the margins for the form object in the Horizontal and Vertical text fields.
Appearance
In this section, you can control the appearance of the background and the hyperlink text.
From the Background color list, select a color to use as the background for the text: Transparent (the default), any of the predefined basic colors, or Custom, which makes it possible to select a custom color from a color palette.
The font and the font size for the text use the font settings from the Forms node by default. Select a font from the Font list: Default font or any of the available fonts. If needed, choose or enter a font size (in points) in the Font size combo box. The default font size is Default size.
You can also select the Bold check box to use a boldface font or the Italic check box to use italics (an italic font).
Under State, you can control the initial state of the hyperlink object when users run the application. By default, the hyperlink object is visible and enabled. Clear the Visible or Enabled check box if you want to make the initial state so that the hyperlink object is hidden or unavailable. You can then make it visible or enable it using a method. In the Form Editor, the state of the form object is indicated by a change in its appearance. Objects that are hidden become visible when selected in the Form Editor.