Controls provides the option of extending the ClassiX® interface by new cotrols. Controls can take on rather complex display functions, such as charts. A selection of controls gets introduced in the module "olectlvw.mod" ("OLE Control Viewer"). All controls presented here are either a part of windows or office and therefore applicable in every ClassiX® environment. The control function is described in the examples. While it is not always possible to look at all functions of an according control, the examples are still a good introduction for an InstantView® developer who wants to start using controls.
Controls are thematically structured and are always started in their own window. If available, there is a link to the reference specified with the according control, the best documentation though can be found via VB / VBA development environment. For this, just call the VBA environment via Alt-F11 in an office application. Then call the control palette via 'view -> tool collection'. It might be required to generate a new form via 'Insert -> UserForm'. Here call the item 'additional controls' via context menu and mark the control, for the required docu. Adding a control of this type to the form makes the documentation automatically available in the object catalogue drop down box ('View -> object catalogue' or F2 on the key board). The object structure can now easily be viewed adnd it is possible to call an exact description for every object.
Furthermore, this example provides a button 'MDI'. which displays the control object method list.
The
progress bar is perfectly suitable for displaying the current state of a rather
long operation. The effect for the user is mainly psychological, since he can
see, that the program is working and did not crash.
In the example it is possible to define progress bar minimum and maximum, as
well as the current value. There is a small macro, which simply counts up the
progress bar value in a loop to demonstrate usability. For this, it is possible
to specify step size and speed, which indicates the waiting time within a loop.
This waiting time is basically substitute for the actual processed operation in
a real application. It is not necessary to manually calculate percental progress,
since the progress bar can also deal with maximum values lower/higher than
hundred. Therefore only the number of steps must be known, and it only needs to
be
counted between start and end value.
Class ID: MSComctlLib.ProgCtrl
Documentation: At Microsoft on the
Internet
Conditions: Although this is a windows default control, it only becomes
available with an existing office also via ActiveX. Hence, office needs to be
installed.
The slider
can be used to define integral numbers out of a predefined range. The slider is
a first example for the use of controls with events. Since the ClassiX®
application should react accordingly to changes of the adjusted value with the
slider, it is necessary that the application reacts to control events. The
slider exemplary code explains, how to achieve this. Here it is certainly also
possible, to adjust minimum, maximum and current value out of ClassiX®.
The slider provides some more functions and features to change the appearance.
that are not described here. Here, our main objective is simple use.
Class ID: MSComctlLib.Slider
Documentation: At Microsoft on the
Internet
Conditions: Although this is a windows default control, it only becomes
available with an existing office also via ActiveX. Hence, office needs to be
installed.
The
date time picker can be used for simplified time and date entry. For date entry,
please click on the arrow button on the right to display the calender box as
shown in the figure. Select a date by clicking on the according number. It is
possible to change the date display, as well as the date selection type. This
control will also show the use of events. After changing the date in the control,
the new date will be displayed in ClassiX®,
too.
The current date in the control will be returned directly as CX_DATE_TIME. This
means an automatic conversion into the correct type via ClassiX®
interface.
Class ID: MSComCtl2.DTPicker
Documentation: At Microsoft on the
Internet
Conditions: Although this is a windows default control, it only becomes
available with an existing office also via ActiveX. Hence, office needs to be
installed.
The chart control provides chart generation in different variations. The
control is part of Microsoft Excel/Microsoft
Office and includes the same options and chart functions as Excel. The example
above shows the option of entering three value rows in the bottom left. The
chart control supports more than three rows, this is just an example. To edit
the table, use the buttons 'Insert' / 'Remove', to insert and remove rows. The
button 'Refresh' adopts values from the table into the chart. You can generate
an sample table via 'Example' button. In the top right, it is possible tot
select the diagram type, by either entering the code for the according type
directly and pressing 'Enter' to confirm, or by switching to the previous/next
type via arrow buttons. Below this, you can modify chart appearance, by
selecting row colors with the buttons and by entering the value row name which
will be displayed in the caption into the text field and confirming with 'Enter'.
The caption itself can be switched on or off via checkbox. The diagram can be
saved as an image file via 'Export' button. These examples for chart control
application only show a small part of its functionality, but provides a good
introduction into the use of charts in ClassiX.
Class ID: OWC11.ChartSpace
Documentation: The Office 2003 web component help files are
(in case it is the German Office 2003 version) installed
in the folder "%Systemlaufwerk%\Programme\Gemeinsame Dateien\Microsoft Shared\Web
Components\11\1031" by default. The chart control help file cannot
be called directly. Instead, it needs to be used out of a Microsoft development
environment. This is specified above. As an additional control, "Microsoft Office Chart 11.0"
needs to be called in this case. The documentation will be available in the
object catalogue under
"OWC11".
Conditions: The Office 2003 web components have to be installed. The
default installation of Office 2003 automatically includes them.
Remarks: In case of an older Office version (such as Office XP), it is
possible to use the provided controls in the described manner, too. The only
thing that needs to be considered is a different version number. The "11" in
Office 2003 becomes a "10" everywhere in Office XP (e.g. Class ID becomes OWC10.ChartSpace).
The
calendar control can be either used to provide a more simple
date selection for the user, (also see Date Time Picker) or
to provide an overview of the current week/month. The example part of the window
shows, how to read out single date information, such as day, month or year, or
how to get the date returned as a whole. For this, the control provides methods,
to skip entire days, weeks, months or even years forwards or backwards. The
control can also cause different events, such as a message for the fiscal year
change.
Class ID: MSCal.Calendar
Documentation: Nt available, single option MDI by ClassiX.
Conditions: The calendar control is part of Microsoft Office
and therefore only available, if Office is also installed.
The web browser control provides access to the Windows Internet Explorer. In general, everything you can do with the Internet Explorer, is possible with the control, too. The most simple application is certainly web page display, as shown in the example below. For this, enter a URL into the text field and start loading via return key or by clicking the "go" button. Another possible use would be file download in the background to process these files directly in ClassiX®. Moreover, it would be possible to realize some kind of report function with the web browser, by displaying the HTML pages generated by ClassiX® with the according information.
Class ID: Shell.Explorer
Documentation: At Microsoft on the
Internet
Conditions: The InternetExplorer is part of windows and therefore also
available.
The FlexGrid Control
enables a tabular display for any data. The table style is openly configurable
as in colours and fonts. The example shows, how number of columns and rows can
be defined with the input fields on the left, by entering the required number
and pressing 'Enter'. On the right, it is possible to specify cell coordinates
-filling. For this, enter the required cell coordinates in the according fields,
and enter the value into the field "value". Now pressing 'Enter' in this field
will adopt the value into the cell.
Class ID: MSHierarchicalFlexGridLib.MSHFlexGrid
Documentation: At Microsoft on the
Internet
Conditions: The control is part of Microsoft Visual Basic, but available
via Microsoft VisualBasic Runtime.
The DHTML Edit Control
enables interactive HTML code editing. The control presents the code as WYSIWYG,
making direct changes possible. Both buttons can be used to load any HTML files
or to save the current HTML code.
Class ID: DHTMLEdit.DHTMLEdit
Documentation: At Microsoft on the
Internet
Conditions: The control is part of the internet explorer and therefore
available on every Windows.
Remark: Microsoft declared the control as outdated. Due to this, it is
not clear, whether it will persist. The use of these controls shoul therefore be
well thought through.