Image of Navigational Map linked to Home / Contents / Search Slicing and Dicing with numbers

by Dean Grieger - GUI Computing
Image of Line Break

There's a new kid on the Custom Controls block, by name of the Component Café. If you haven't heard of them just yet, you will, if their first major offering is anything to go by. Of course, their naming leaves a bit to be desired…

Kitchen Utensils?

My initial examination of these tools returns a feel of relief and an understanding that the developers used a modern approach called KISS (Keep It Simple Sweetie). These are truly utensils - easy to use, conveniently designed and tough enough to use every day. They're probably even dishwasher-safe.

Working in Technical Support gives me a common developer's insight into the ongoing pressures of deadlines and the need for simple, robust tools - and while the Component Café doesn't provide astonishing power with fantastic graphics at the drop of the control in this set, the set combines simplicity with mathematics, thereby reducing the need for developers to pull hair out coding streams of common math… something my balding brother Stephan will be happy to hear.

The tools ship with a 16 and 32 bit OCX for VB4 (there is no definite information regarding its VB5 compatibility, but the 32bit OCX seems to work just fine) and consists of three controls, each dealing with mathematics routines.

They Slice!

Two of the controls - "Eval-O-Matic" and "Func-O-Matic" - run hidden, and consist of a small range of properties covering a variety of mathematical routines:

  • Standard Math
  • Trig
  • Financial Math
  • Statistical Math
  • Logical Math
  • Unit Conversion, and many more.

    Importantly, they mostly use standard Excel conventions (where they are appropriate), which makes developing or testing calculations as easy as pie - simply do it in Excel, then drop the resulting calculation into your code. And easy… you bet!

    For example, a median function will return "MEDIAN(1,2,3,4,5)" as 3 - you really don't need to be a mathematical genius to write applications with complex financial requirements anymore! That's a trivial example, but you get the idea I'm sure.

    The Expression property enables developers to open the capabilities of this control to the end user. A simple text box provides a good interface with the hidden controls. The user can then type a mathematical expression i.e. "(6 * 8) / (5 -7) * 9 / 0.2" which with one line of code can be passed to the Expression property, where the result is automatically passed to the ResultStr property. That's what I mean by the KISS principle.

    They Dice!

    The third control is a Calculator (yes, "Calc-O-Matic") with three different display settings - Combo, embeddable or floating calculator. Obviously, this uses the other two controls to do the real work.

    As a drop down Combo Box, it appears as a standard VB combo. However, drop it down and it forms the calculator. The Combo display setting saves space and provides instant data storage from the calculator to the combo box.

    When a Combo style calculator is dropped down, a CCDropDown event is triggered which enables the developer to display a default value before users have a chance to key in their own. A CCPopUP event is triggered when the calculator is popped up. This gives the programmer a chance filter the data before it is updated to the ComboBox. One impressive feature of this tool is this range of interactive events, in all the spots you'd want them. An OnCalculate event is fired as the user presses the equals button, for example, enabling the developer to mask the input.

    This control comes equipped with six types of calculators:

  • Standard
  • Scientific
  • Extended Scientific
  • Financial
  • Statistical
  • Café Classic

    Setting up a calculator type couldn't be easier i.e. CalcOMatic1.CalcStyle = (0 through to 5)

    This control is ideal for developers wanting to provide users with powerful mathematical functionality without dealing with mathematical routines.

    All in all, a set of simple controls capable of processing complex mathematics with a bare minimum of code. Need I say more? Well, yes. These controls aren't cheap at $US189. But that might just be a small price to pay if you need them.

    But please! those names!

    Written by: Dean Grieger
    July '97

    Image of Arrow linked to Previous Article
    Image of Line Break