News

Clarion Metro Caption Template

In a previous post I discussed how we wanted to “modernize” the appearance of a simple Clarion application. We decided to use styling similar to that found in Norton Internet Security, namely a single MDI frame with a large toolbar and sub windows maximized within the main frame.


Thanks to the Clarion Metro Wizard class posted by Brahn Partridge we found the means to remove the standard Windows caption bar and replace it with a “Metro” style caption bar. We adapted this to a frame procedure and set about building our app with maximized MDI child procedure windows.

Maximized Child Procedure Windows

It is possible to develop an application in Clarion with all child procedure windows maximized, but there isn’t a “switch” to achieve this. So, we developed the procedures we needed and set the necessary properties to maximize each window, and hide the title bar and borders. Then we added some code to display the missing window title in the caption bar of the frame.

After we’d done a few windows we realized we were working harder, not smarter which is not the way things should be done with Clarion. So, we developed a template, then we added a class.

What the Metro Caption template does

The template evolved as we worked with it and discovered the little idiosyncrasies of Metro style apps. These are some of the things we have addressed…

For the Frame procedure

  1. Hide the Windows caption bar.
  2. Add a region to a toolbar on the application frame to allow moving the frame.
  3. For Maximized child procedures
  4. Remove the caption and borders from maximized MDI child windows.
  5. Resize child MDI windows to fill the frame.
  6. Disable the default Clarion resizer.
  7. Update the frame caption bar text with the current child window title text.
  8. Centre controls within the resized window
  9. Support for resizing windows.
  10. Only allow a maximized procedure to be started once.
  11. Manage which procedure has focus.

For non-maximized child windows

  1. Hide the Windows caption bar.
  2. Add a toobar, region and icons to create a Metro-style caption.
  3. Provide a Frame Background Procedure
  4. Allow a procedure to be the frame background, with full functionality.
  5. Enable and disable the background procedure to prevent MDI windows becoming hidden behind it.
  6. Add routines and embed points for finer programmer control of functionality.

Get the template

We’re temporarily supplying the template free of charge during a beta period. There are two example applications and limited documentation, at this stage. The template is only suited to the ABC chain and Clarion versions 9.0, 9.1 and 10.0.

Clarion developers are invited to download the template and provide feedback, code suggestions and feature requests.

The template might, or might not, be launched as a commercial product in the future?

Please provide the following information and we’ll email you a download link for the installer.

Get the File

A valid email address is required

Please agree to these terms

  • Template is provided "as is"
  • No warranty is expressed or implied
  • No liability will be accepted for any damage, or loss, caused by the use of this template.
  • The file and code is the copyright of Comformark Pty Ltd
  • The file is not to be distributed to any other party
You must agree to our terms*

<< Go back to the previous page