Member attributes: SVGContent
This attribute determines the content of an SVG image to use by an SVG resource member.
Syntax
Form 1:
SVG‑file‑name
Form 2:
SVG‑content‑text
Discussion
The attribute SVGContent determines the content of an SVG image. In its first form, the attribute can be configured with a path referring to the *.SVG file, where the desired SVG image is stored. If the attribute doesn't specify an absolute file path, the path is considered as being relative to the directory of the unit, where the affected SVG resource is defined as its member.
In its second form, the attribute can be configured with the SVG content itself, which is XML text. In this case, no external *.SVG files need to be maintained and the SVG content will become part of the project itself. The XML text can be entered directly in the attribute.
Modify the attribute
To inspect or modify the value of an SVGContent attribute, select first the affected SVG resource member. Thereupon, the attribute is listed in the middle area of Inspector. Please note the available file selection assistant you can activate by clicking on the button right to the attribute. This assistant is useful if you want to select an *.SVG file:
If you intend to enter the SVG content as text directly in the SVGContent, it is convenient to activate the menu option and edit the content directly within the Code Editor window instead of using the small input field in Inspector. In the Code Editor you can also enter multiline text. The connection between the Inspector and Code editor can also be established by clicking on the tool button found in the upper left corner of the Code Editor window. For example:
Localization
The attribute SVGContent can be localized allowing the creation of SVG resource members with language dependent images. For this purpose expand the attribute by clicking on the small triangle left to the attribute. All available language specific values are listed thereupon below the attribute and can be modified individually:
If you haven't specified any SVG content for a particular language specific value, the image from the fallback language Default is used automatically. Once localized values can be removed easily by pressing the keys CtrlR when the affected value is selected.