![]() |
Copyright © TIBCO Software Inc. All Rights Reserved |
To view the sample for this task, import the advanced sample projects as described in Import the Forms Advanced Samples. The sample form and CSS file for the task described in this section are contained in the forms.samples.layout sample project.
• The form (ControlRendering.form) is at the following location:
• The CSS file (ControlRendering.css) is at the following location:See Chapter 7, Reference for a detailed description of the CSS classes used in rendering forms.The customclass is the name of a CSS class specified in the design time model.
2. Link the form to a custom CSS stylesheet. A custom CSS stylesheet called ControlRendering.css is provided in the forms.samples.layout project in the directory Forms/Presentation Resources/css/
To create a CSS file in your project In the Project Explorer, right-click the Presentation Resources folder for your project and click New > File. The New File dialog will open, where you indicate the parent folder where the CSS file for this form will be contained, and the file name. If there is already a css folder within your Presentation Resources folder, you can choose that one or, if not, create a folder with that name. But whether you use a subfolder, and if so, what it is named is unimportant. What is important is that the CSS file be placed in or under the Presentation Resources folder and that its filename ends with the extension .css. When you click Finish, the CSS file is created and opened in the editor.
To link a form to a CSS stylesheet Be sure the CSS file is already present in the Presentation Resources folder. Then, in the Properties view for the form, click the Resources tab. Click the plus sign (+) to add a resource. The Pick Resource dialog opens, displaying a list of the resources currently residing in the Presentation Resources folder, including CSS files, JavaScript, and image files, if any. Select the desired CSS file and click OK. Your CSS file has now been added as a resource to your form. The definitions it contains will be used to render the form in HTML.The remainder of these instructions assume that your CSS file matches the sample file in the forms.samples.layout project.
3. With the form open and visible in the editor, click one of the controls on the form to open the Properties view for the control.
4. Enter control-rendering in the Style Class Name(s) box on the General tab of the Properties view for the control.The CSS selector used here is .highlight .label. This is used for clients that use GWT, which is the rendering used in AMX BPM Openspace and Workspace.
![]() |
Copyright © TIBCO Software Inc. All Rights Reserved |