In this section: How to:
Reference: |
You can use ActiveX controls in your forms. ActiveX controls are compiled software components that provide a set of business or user interface functions. They can extend the functionality of your applications.
ActiveX controls are included in your project as resources. Resources are part of your project, but you do not create or edit them directly using the Maintain Development Environment. However, WebFOCUS Maintain will take care of deploying them to the correct location so that your application will run properly.
When you place an ActiveX control on your form, the property sheet for that control gains an extra tab: the ActiveX tab. The properties in this tab determine the behavior of your ActiveX control. Use JavaScript or VBScript for your Maintain procedure to access these properties.
Depending on the security settings of your end users browsers, ActiveX controls may be disabled. (For example, to change your security settings for Internet Explorer 5, in the Tools menu, click Internet Options, then click the Security tab, and click Custom Level. You will see a Security Settings dialog box where you can enable or disable various features, including ActiveX controls.)
If you have ActiveX controls as resources in your project, WebFOCUS Maintain will display the Insert ActiveX Control Resource dialog box.
or
In the Insert ActiveX Control Resource dialog box, click Create a new ActiveX control resource.
WebFOCUS Maintain opens the Resource Wizard, a series of windows that guide you through adding an ActiveX control to your project.
You will return to the Resource Wizard with the ActiveX control name and location listed.
To use the value of an ActiveX Control property in a Maintain function, use JavaScript or VBScript to retrieve it. In an event handler for an ActiveX control event, use a script function for the handler and then call the Maintain function using IWCTrigger. For more information on IWCTrigger, see How to Use the IWCTrigger Function to Call a Maintain Function From Your Script Handler.
IWCTrigger ("MaintainFunction",document.form.control.property);
where:
Is the name of the Maintain function you are calling.
Is the name of the form the ActiveX control is on.
Is the name of the ActiveX control.
Is the name of the ActiveX control property (look for ActiveX control properties in the ActiveX tab of the property sheet for the ActiveX control).
If you have an ActiveX calendar control on Form1 which has a property called Month, you can use IWCTrigger to send the value of Month to a Maintain function called UpdateDate, using either JavaScript or VBScript:
IWCTrigger("UpdateDate",document.Form1.CalendarControl.Month);
You use the Insert ActiveX Control dialog box to select an ActiveX control to include as a resource in your project.
This dialog box contains the following elements:
Contains a list of the supported ActiveX controls available on your machine.
Tells WebFOCUS Maintain to update the list of ActiveX controls when you add a new one to your machine.
You use the Insert ActiveX Control Resource dialog box to select which ActiveX resource to insert into your form.
This dialog box has the following elements:
Lists the available ActiveX control resources in your project.
Opens the Resource Wizard, where you can add a new ActiveX control to your project.
When you select your ActiveX control, you will see a list of ActiveX control properties in the property sheet. Changing these properties will change what your ActiveX control looks like and what it does at run time.
Many of the styling properties can also be changed using a Cascading Style Sheet. For more information on Cascading Style Sheets, see Using Cascading Style Sheets.
An ActiveX control also contains an ActiveX tab in the property sheet that contains more properties that are specific to the control. For more information on these properties, see the documentation that accompanied the control.
Do you want... |
Then use... |
---|---|
to change the name of the ActiveX control that identifies it to the procedure? |
the (Name) Property property. |
to change the size or location of the ActiveX control? |
the Bottom Property, Left Property, Right Property, and Top Property properties. a style sheet. (You can also move or resize the ActiveX control directly in the form.) |
to make the ActiveX control inactive or make it invisible? |
the Enabled Property property to determine whether the ActiveX control is active or not. (If the ActiveX control is inactive, it will be grayed out and nothing will happen when the end user clicks it.) the Visible Property property to determine whether the ActiveX control is visible to the end user. a style sheet. |
to change what the cursor looks like when it is on top of the ActiveX control? |
the CursorPointer Property property. a style sheet. |
to display a tool tip when the cursor is on top of the ActiveX control? |
the ToolTipText Property property. |
to assign a help topic to the ActiveX control? |
the Help property. For more information, see Assigning Help to Your Forms and Controls. |
the end user to be able to tab to the ActiveX control? |
the Tabstop Property property. |
to move the ActiveX control to another layer? |
the Layer property. For more information, see Layering Controls. |
Occasionally, you may have unstable ActiveX controls on your computer that have been installed with other software or downloaded from the Web. If your computer has any unstable ActiveX controls, when you first generate the list of available controls for the Insert ActiveX control dialog box or when you refresh the list, a control may cause the Maintain Development Environment to crash while it is reading the control. However, from that point on, WebFOCUS Maintain will keep a list of any unstable ActiveX controls in the registry and will no longer try to load them into the list. Therefore, you will never crash more than once over the same unstable control.
Note: The only way to take a control off of the "black list" is to delete it from the registry.
WebFOCUS |