CapeSoft.Com
Clarion Accessories
Resize And Split
Documentation
CapeSoft Logo

CapeSoft Resize And Split
Documentation

Download Latest Version JumpStart FAQ History
Installed Version Latest Version  

Introduction

CapeSoft Resize And Split is derived from the old IngasoftPlus product called EasyResizeAndSplit. That product was discontinued. Subsequent to being discontinued CapeSoft acquired the rights to the EasyResizeAndSplit code and this product is the result.

Resize And Split offers two related features for use in your application. The first is a Window Resize template, which allows you to control how your window behaves when it is resized. The second is a splitter bar, which you can place on a window either horizontally or vertically, which allows the user to resize the "panes" on your window to match their desire.

Upgrading from EasyResizeAndSplit

Upgrading from EasyResizeAndSplit (by IngasoftPlus) to CapeSoft Resize And Split should be completely seamless. The template and class interface has been designed to be completely compatible with EasyResizeAndSplit, and you should not need to make any changes to your app.

One change you may have to make is removing the old EasyResizeAndSplit DLL from your solution. Go to the Libraries, Objects and Resource files section of the solution and look for any of CLAERS.LIB, CLAERSL.LIB or CLAERSLO.LIB. Since CapeSoft ResizeandSplit is shipped as all-source-code, there is no need for your program to include these LIB's at all.

If you are using ResizeAndSplit in a Multi-App system then please see the section Using in a Multi-DLL System for information on how to set it up correctly in your system

Features

Jump Start

  1. Add the Activate CapeSoft ResizeAndSplit Global extension template to the Application
  2. Add the CapeSoft ResizeAndSplit local extension template to the window procedure. Leave the default settings as they are.
  3. Compile and test the procedure
  4. If there are any changes you would like to make to the way that the window is resizing then you can go back to the window designer, right click on the control, and choose Action. On the Actions prompts click on the Resize And Split : Resized / Moved button. You can then adjust the settings as desired . (See the Templates section below for more on the local template settings.)

    Note: If you find yourself making the same template changes over and over for a specific control type, then consider setting, or changing, the defaults for that control type on the global extension. See below for more information on the Global Extension template settings.

Templates

If you need to manually register the template, the file can be found in \clarion\accessory\template\win and is called ResizeAndSplit.Tpl.

Global Extension Template

General Tab

Disable All Resize And Split Features
This disables the Recent Lookup template, and no template code will be generated into the application. This is useful for debugging.

Settings Tab

Add Grab Handle...
If this is on then a visual indicator appears at the bottom left corner of all windows that have the Resize template on them.
Style
The Grab Handle style. Choose one of the options from the drop-down.
Cursors For Vertical Splitters
The cursor used when the mouse moves over a vertical splitter bar. Default is Cursor:SizeWE.
Cursors For Horizontal Splitters
The cursor used when the mouse moves over a horizontal splitter bar. Default is Cursor:SizeNS.

Controls Tab

The control type listed here provide the default action for the various controls on the window, when the resize template is first added to the window. If you make changes here then these changes do not cascade down to existing resize extensions.

For an explanation of the various resize strategies, see the section Resize Strategies.

Multi-DLL Tab

This is part of a Multi-DLL Program
Tick this on if this application is a DLL or EXE which is part of a multi-app suite of apps.
Export ResizeAndSplit Classes from this DLL
Tick this on only if this is the data DLL in the suite of apps.

Classes Tab

Class Version
An internal version number.

Local Resizing Extension Template

General Tab

Disable this template here
Tick this option on to suppress this template in this procedure.
Disable this template IF
Allows an expression, evaluated at runtime, to determine if the splitter can be used or not. If the expression is true then the splitter is disabled.
Restrict Minimum Window Size
If this is on then the design-size of the window will be considered as the smallest that the window can be resized to.
Allow Resize
Allows you to limit the resizing to just horizontally, or just vertically, or allows for both.

Options Tab

Add Grab Handle...
If the Global setting is on, and this is on, then a visual prompt will appear in the bottom right corner of the window to indicate to the user that the window is resizable.

Control Strategies Tab

For a detailed explanation of Control Strategies, see the Resize Strategies section.

Classes Tab

Object
The object name. Defaults to csResize.
Class
The class name. Defaults to csResizeClass.

Local Horizontal / Vertical Splitting Template

Options Tab

Disable this template here
Tick this on to disable the splitter control on the window. The control will still be visible, but none of the code under the control will exist.
Disable this template IF
Allows an expression, evaluated at runtime, to determine if the splitter can be used or not. If the expression is true then the splitter is disabled.
Top / Left Fixed
Tick this on to set a Top Control or Left Control.
Top Control
A control which determines the extent of the splitter movement. The splitter will not be able to move past this control. 
Bottom / Right Fixed
Tick this on to set a bottom control.
Bottom Control
A control which determines the extent of the splitter movement. The splitter will not be able to move past this control. 
Split Type
Different visual types for the splitter control.
Normal Image File
If using the Image split type, then this is the graphic for the image.
Selected Image File
As above - but when the split control is selected.
Pressed Image File
As above - when the split control is pressed.

Splitting Strategy Tab

Resized Controls
Select which controls should be resized as the splitter bar moves.
Moved Controls
Select which controls should be moved as the splitter bar moves.

Template documentation coming soon.

Resize Strategies

Fundamentally when a window is resized, two possible actions are applied to every control on the window.

A control can be resized, or moved, or both. Or just left alone. ResizeAndSplit allows you to finely control what happens to the control, and in what proportion. Additionally the settings for Horizontal, and Vertical actions are separate, so you can control them separately.

Resizing and Splitting Mixed Together

A splitter control works by adjusting the size of the controls to the left and right (or above and below) the splitter control. Resizing works by adjusting the size of controls when the window is resized. It is possible to set up the resizing settings so that these two items work against each other when the window is resized.

Take the case where you have two list boxes, separated by a horizontal splitter (ie a vertical splitting line.) In this situation the right-list control should be set to "horizontal resize" and the left-list control should be set as "horizontal none".

Equally with list boxes split with a vertical separator, the top control should be set as "vertical none" and the bottom one should be set as "vertical resize".

Failure to do this creates a race condition between the placement of the two lists, and the splitter bar itself. The Window resizer, and Splitter resizer fight each other resulting in a window which is very large. (The class prevents the race from continuing infinitely, but the result is not pretty.)

If you have multiple splitter controls on the window, then the controls closest to the Right, and Bottom, edges should be set to resize. All other controls should be set not to resize.

Using in a Multi-DLL System

In your Data-DLL: In your other applications (that use ResizeAndSplit) - including DLL and EXE apps:

Blob In Control Template bug

This bug was fixed in Clarion 11.1 build 11.1.13855. If you are on that build or later then ignore this section. If you are on an earlier build then make the template adjustment recommended below.

The shipping template extension, "Display / Update BLOB used in a Control (Image or Text)" contains a bug that can cause resizing problems if the window opens in maximized mode.

To Fix the Error;

Edit BlobSrv.Tpw
Circa Line 278

#IF(NOT %pFromReport)
DISPLAY(%BlobLinkedControl)   ! <-- remove this line
#ENDIF


Reported as PTSS 43361.

Examples

ABCDemo.Sln

In \Clarion\Examples\ResizeAndSplit\ABC folder.

This example shows the Resize template in operation on the browse procedures.

It also shows the Vertical splitter in operation on the BrowseCustomer window, and the Horizontal splitter in operation on the BrowseInvoices window.

LegDemo.Sln

In \Clarion\Examples\ResizeAndSplit\Legacy folder.
Same as the ABC example above, but based on the Legacy templates not the ABC templates.

Demo.Sln

In \Clarion\Examples\ResizeAndSplit\MultiDLLabc folder.

This example contains 3 apps in the solution.
DataDLL.App is the root DLL which declares and exports all of the classes.
Functions.App contains all the browse and form procedures.
Demo.App contains the Frame procedure and compiles as an Exe.

Note the settings on the Multi-DLL tab (on the ResizeAndSplit Global extension) on all 3 apps. For more information on the settings see Using in a Multi-DLL System.

Class Reference

csResizeAndSplitClass

csResizeClass

csSplitClass

csVSplitClass

csHSplitClass

csSplitImageClass

Frequently Asked Questions

1. How to set a splitter bar position, in code?

Splitter bars are a REGION control on the window. You can move the bars in code if you like. Set the prop:xpos or prop:ypos of the control as appropriate, then call the RESIZE method. For example;

?EasyHSplit{prop:xpos} = 200
csResize.Resize()


Note that it is the Windows Resizing object, resize method, which is called, NOT the splitter object itself.

Support

Your questions, comments and suggestions are welcome. See our web page (www.capesoft.com) for new versions. You can also contact us in one of the following ways:
CapeSoft Support
Email
Telephone +27 87 828 0123

Installation

Run the supplied installation file.

Distribution

This product is supplied as source files that are included in your application. There are no additional files for you to add to your distribution.

License and Copyright

This template is copyright © 2022 by CapeSoft Software. None of the included files may be distributed. Your programs which use this product can be distributed without any royalties due on this product.

Each developer needs his own license to use this product. (Need to buy more licenses?)

This product is provided as-is. Use it entirely at your own risk. Use of this product implies your acceptance of this, along with the recognition of the copyright stated above. In no way will CapeSoft Software, their employees or affiliates be liable in any way for any damages or business losses you may incur as a direct or indirect result of using this product

Version History

Version 5.10 (27 April July 2022)
Version 5.09 (12 July 2021)
Version 5.08 (13 May 2021) Version 5.07 (4 February 2021) Version 5.06 (14 May 2020) Version 5.05 (8 May 2020) Version 5.04 (5 May 2020) Version 5.03 (30 April 2020) Version 5.02 (28 April 2020) Version 5.01 (18 April 2020) Version 5.00 (13 April 2020) Version 4.21 (30 January 2020) Version 4.20 (20 March 2019) Version 4.19 (14 Sept 2018) Version 4.18 (11 May 2018) Version 4.17 (16 January 2017) Version 4.16 beta (1 November 2016) Version 4.15 beta (28 October 2016) Version 4.14 beta (23 May 2016) Version 4.13 beta (24 March 2015) Version 4.12 beta (11 March 2015) Version 4.11 beta (2 March 2015) Version 4.10 beta (24 February 2015) Version 4.09 beta (18 February 2015) Version 4.08 beta (16 January 2015) Version 4.07 beta (4 December 2014) Version 4.06 beta (4 December 2014) Version 4.05 beta (26 November 2014) Version 4.03 beta (31 October 2014) Version 4.02 beta (30 October 2014) Version 4.01 beta (30 October 2014) Version 4.00 beta (28 October 2014)