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
- Window Resizing Template
- Splitter Control (Horizontal or Vertical)
- Shipped as source code, no DLL required.
Jump Start
- Add the Activate CapeSoft ResizeAndSplit Global extension template
to the Application
- Add the CapeSoft ResizeAndSplit local extension template to the
window procedure. Leave the default settings as they are.
- Compile and test the procedure
- 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
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:
- Add the Global Extension template, go to the Multi DLL tab and tick
on both options;
This is part of a Multi-DLL program and
Export ResizeAndSplit Class from this DLL
In your other applications (that use ResizeAndSplit) - including DLL and
EXE apps:
- Add the Global Extension template, go to the Multi DLL tab and tick
on only the first option;
This is part of a Multi-DLL program
Make sure the second option is turned off.
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 © 2024 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. CapeSoft Software and CapeSoft Electronics
(collectively trading as CapeSoft), their employees and dealers explicitly
accept no liability for any loss or damages which may occur from using
this package. Use of this package constitutes agreement with this license.
This package is used 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 , 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.
For the full EULA see
https://capesoft.com/eula.html
Version History
Version 5.11 (14 June 2024)
- Fix: Remove extra call to RedrawWindow
Version 5.10 (27 July 2022)
- Fix: Saving splitter bar in INI file, In Legacy apps, did not work
if the Global Legacy INI file settings were CSIDL.
- Fix: Storing of Splitter bar in INI file left spaces in procedure
name.
Version 5.09 (12 July 2021)
- Event:AfterResize generated after splitter bar has (completely)
moved.
Version 5.08 (13 May 2021)
- First Clarion 11.1 build
- Change: Legacy Apps generate a DoResize event for Each Sized event,
and then force a browse refresh (window reset) for every DoResize
event. Code added to the template to only reset the window on an
EVENT:AfterResize which is only generated if the window is actually
resized. Fixes a long-standing issue with Legacy apps flickering.
Version 5.07 (4 February 2021)
- Change: Resize method makes a quick exit if WindowPosition =
self.CurrentWindowPosition
Version 5.06 (14 May 2020)
- Adjustment: The events generated, and acted on, are now more
consistent with the Clarion window resizer, making it easier for other
templates to predict behavior. The TakeEvent priority has also been
adjusted, to reflect the Clarion resizer priority of 0.
Version 5.05 (8 May 2020)
- Fix: csResize Class did not like controls that were _designed_ to
exceed the boundaries of the window.
Version 5.04 (5 May 2020)
- Fix: Restore of method name Strategy for Noyantis compatibility.
Version 5.03 (30 April 2020)
- Add: Global Extension, Settings tab, Warn if windows missing resize
attribute checkbox.
- Fix: Template test for RESIZE
Version 5.02 (28 April 2020)
- Fix: Prop:imm forced to on for the window.
- Fix: Calculation for proportional moving and resizing was off.
- Add: Call in InvalidateRect after window is sized.
- Add: Template warns you if the resize template is on a procedure
where the window is not set to be resizeable.
Version 5.01 (18 April 2020)
- Fix: If a browse window was resized (bigger), the browse didn't
reset with new data.
Version 5.00 (13 April 2020)
- Major refactor - primarily to support AnyScreen and ChromeExplorer.
Windows API calls have been removed.
Subclassing has been removed.
All methods Virtual, All Private's removed.
Internal Position information has changed from ERS_RECT to ERS_POS
- Removed template option "Force IMM off for the splitter control".
- Removed template option "Dynamic Resizing" (Sizing is always Dynamic
now).
- Split Type "Inverted" removed. (Uses Panel instead).
Version 4.21 (30 January 2020)
- Added template option to bulk add controls to a resize/move group.
- Added: template option to remove deleted window controls from a
resize/move group
- Fix: Template regression in include support for MultiProj.
- Added: Template support for disabling a splitter bar (at template
level).
Version 4.20 (20 March 2019)
- Change: Event:GainFocus generates Event:SplitMove event to better support tools
like RecentLookups.
Version 4.19 (14 Sept 2018)
- Add: Clarion 11 to install.
- Add: Template option to turn off Immediate
attribute on splitter control.
Version 4.18 (11 May 2018)
- Add: Template Option to disable resizing at runtime.
- Add: Support for Multi-Proj
- Fix: Splitter could move if window was opened maximized and WinEvent
Visible on Desktop was used, and WinEvent was set to defer the visible
on desktop.
- Fix: Bug in IsSized where Width and Height were reversed.
Version 4.17 (16 January 2017)
Version 4.16 beta (1 November 2016)
- Fix: If the Window Statement spanned multiple lines of text, and
RESIZE was the first attribute on line 2, then the Width Only / Height
Only resizing restriction was not applied to the window.
Version 4.15 beta (28 October 2016)
- Fix: If a window changed maximized status, when a later window in
the thread was open, then it did not apply resizing.
Version 4.14 beta (23 May 2016)
- Fix: Splitter bar did not save position between window closing and
opening.
Version 4.13 beta (24 March 2015)
- Tweak to avoid another possible GPF when closing. (Thanks to Owen
Brunker).
Version 4.12 beta (11 March 2015)
- Tweak to avoid possible GPF when closing. (Thanks to Owen Brunker
and Irene Cook).
Version 4.11 beta (2 March 2015)
Version 4.10 beta (24 February 2015)
- Fix: Having multiple splitters on the window could cause a GPF when
the window closes, depending on the object destruction order.
Version 4.09 beta (18 February 2015)
- Fix: Button's did not resize even when told to do so.
- Fix: Procedures not the first in the thread did not resize on open.
- Fix: Procedure could cause a Stack Overflow if controls were
designed to be "off screen"
Version 4.08 beta (16 January 2015)
- @p pic removed from SPIN controls.
- 1 pixel change introduced in 4.06 removed.
Version 4.07 beta (4 December 2014)
- Change: Percentages for moving and resizing now allow for decimal
places - allowing for greater control on larger windows.
Version 4.06 beta (4 December 2014)
- Fix: Controls could not be edited via the Local Extension, only via
the Window Formatter.
- Fix: Some controls could draw 1 pixel too few in width and height.
Version 4.05 beta (26 November 2014)
- Add: Different Corner-Handles; Currently Lines and Dots - set on
Global extension.
- Add: Legacy Example
- Change: Methods in the classes made Virtual.
- Change: Updated template to CapeSoft Object Generation standards.
- Change: Template generates into TakeEvent and
AcceptLoopBeforeEventHandling, not WindowOtherEventHandling
- Fix: Possible GPF when closing a window if the class Destruct order
is not what was assumed.
- Internal: rename parameters to HSplit.Moved and VSplit.Moved to
avoid compile warning.
- Documentation - Added Template Reference.
Version 4.03 beta (31 October 2014)
- Add: Global support for setting Cursors on Horizontal and Vertical
splitter controls.
- Change: Cosmetic updates to template
- Change: Cosmetic updates to generated code
- Change: when using an "Image" Type splitter, the cursor applies to
the image, and region control.
Version 4.02 beta (30 October 2014)
- Add: Support for Multi-ALL ABC Apps
- Add: New Multi-DLL ABC Example
- Fix: Missing hand.cur file included in install
Version 4.01 beta (30 October 2014)
- Add: Basic ABC example
- Fix: Template wasn't reading classes correctly.
- Cosmetic updates to templates.
- Included missing graphics in install file.
Thanks to Greg Fasolt for feedback on this build.
Version 4.00 beta (28 October 2014)
- First CapeSoft release - primarily for people using
EasyResizeAndSplit who want to use Clarion 9.1.
Thanks to Greg Fasolt for feedback on this build.