TGraphicEdit

Version 1.1
Copyright  1996 Richard Borland.


Files Included
--------------
  README.WRI		this file
  README.TXT		text version of this file
  EDITGRPC.DCU		TGraphicEdit compiled unit
  EDITGRPC.DCR		TGraphicEdit component palette icon

Overview
---------------
The TGraphicEdit component is a native Delphi component derived from TGraphicControl. It offers a graphical alternative to the existing TEdit. As such, it has the same functionality as TEdit (with the exception of those functions which are specific to windowed controls). However, in addition to the standard TEdit properties, there are improved facilities for text placement and font sizing. These give the user a flexible way of controlling the component's visual appearance and can be particularly useful for those wishing to construct their own components which incorporate an edit control.

Installation
------------
To install the component:
  copy the files EDITGRPC.DCU and EDITGRPC.DCR to \delphi\bin (or whichever directory suits you best)
  launch Delphi and select Options|Install Components (a dialog box appears)
  select Add
  select Browse
  select \delphi\bin\EDITGRPC.DCU
  select OK
To remove the component:
  select Options|Install Components
  select EDITGRPC in the Installed Units list box
  select Remove
  select OK

Description
-----------
With the exception of those functions (properties/methods) that are applicable only to windowed controls, TGraphicEdit has the same functions as TEdit and additionally, some new properties which give the user greater control over text placement. In some cases however, the exact behaviours of some of the functions have been altered. These changes have been made either to clear up small ambiguities and anomalies that existed in the behaviours of the original functions or because the behaviours of the functions have been extended due to their interactions with the new properties that TGraphicEdit introduces. 

Changed/ N.A Properties
-----------------------
  AutoSelect - unchanged but worth noting that AutoSelect will only function by calling the SetFocus function, since it is not possible to switch focus to the control by the Tab key (focus is set either through 'SetFocus' or by clicking on the control).
  AutoSize - behaviour has been extended to cope with the new properties; see BMargin and TMargin below.
  BorderStyle - in the old TEdit control, if this property is not set to bsSingle, the text is not properly centered and the AutoSize property doesn't work.  These restrictions are removed in the TGraphicEdit property.
  CharCase/OEMConvert - in TEdit, changes made to either of these properties causes the text to be irrevocably changed.  With TGraphicEdit, the original text is restored when these properties are returned to their original values.
  Ctl3D - since the Ctl3D.DLL is intended for use with window controls only, this property is simulated by painting the Ctl3D look directly onto the control.
  SelLength/SelStart - the normal behaviour of these properties is unchanged but their response to bad input (e.g. negative values) has been tidied up and made a bit more predictable.
  Showing (N.A) - not implemented (applies only to windowed controls).
  TabOrder (N.A) - not implemented (applies only to windowed controls).
  TabStop (N.A) - not implemented (applies only to windowed controls).

New Properties
--------------
  BMargin - this property specifies the size in pixels of the margin between the bottom of the text and the bottom of the edit window (not including the BorderStyle and Ctl3D look). The effect of changing the value of BMargin varies, depending on whether the 'AutoSize' property is True or not: if 'AutoSize' is True, then the top margin remains fixed and the font size is either squashed or stretched according to whether the bottom margin is increased or reduced; if 'AutoSize' is False, then the font size is fixed and the top margin is reduced/enlarged by the amount that the bottom margin is enlarged/reduced. The best way to understand how 'BMargin' and 'AutoSize' interact is to try them out - beware however, the default 'System' font cannot be resized in Delphi; in order to see these properties working properly, you need to change the font to a TrueType font, e.g. 'Arial'. Note also, that this property cannot be changed when 'Center' is True for obvious reasons (see 'Center' below).
  Center - when this property is True, the text is always centered, regardless of the values of other properties (in TEdit, text is only centered when 'BorderStyle' is bsSingle and 'AutoSize' is True; even then the user cannot control the sizes of the top and bottom borders).
  LMargin - this property specifies the size in pixels of the margin between the left of the text and the left of the edit window (not including the BorderStyle and Ctl3D look).
  RMargin - similar to LMargin.
  TMargin - similar to BMargin.

Changed/ N.A Methods
--------------------
  GetSelTextBuf - TEdit causes a general protection fault when the 'BufSize' parameter is zero or less.  TGraphicEdit responds to this situation by returning a value of 0 (signalling that no characters were copied).
  GetTextBuf - same change as GetSelTextBuf. 	
  ScaleBy - not implemented (applies only to windowed controls).
  ScrollBy - not implemented (applies only to windowed controls).
  SetFocus - the apparent effect of this method is unchanged but it should be noted that TGraphicEdit is not a windowed control, therefore focus cannot really be set to the control. Instead, focus is set to a class-wide dummy windowed control which channels focus messages to the currently 'focused' TGraphicEdit.

Registration
------------
This is an unregistered version of a shareware component.  If you like the component then you can register it for the sum of 10 pounds sterling or 16 US dollars (10/$16). When you register, you get the following:

  Latest version of the component (minus the registration 'nag' message).
  Full source code for the component.
  Free technical support (either by e-mail or snail mail). 
  Free minor upgrades and a reduced fee for the next major upgrade.
  Full rights to use the component royalty free in any application.

Please send your registration fee to:
					
			Richard Borland,
			10 Holly Place,
			Kilmarnock,
			KA1 2JU.
			Scotland.

Please specify whether you want the component delivered via e-mail or snail mail (if you want the component via snail mail then please add 3/$5 to the fee to cover the cost of the disk and postage).

If ordering from a country other than the UK, please do not send cheques drawn on non-UK banks. Use a cashiers check or international money order valued in "United Kingdom Pounds Sterling". Or you could just send cash (10 UK pounds or 16 US dollars).

Comments/Suggestions
--------------------
Comments and suggestions (of any kind) are always welcome. If you would like to make any, then please contact me at:

			Richard Borland,
			10 Holly Place,
			Kilmarnock,
			KA1 2JU.
			Scotland.

			e-mail: r.borland@dcs.napier.ac.uk

Thank you for your interest in this component.

Warranty
--------------
TGraphicEdit is supplied as is. The author disclaims all warranties, expressed or implied, including, without limitation, the warranties of merchantability and of fitness for any purpose.

The author assumes no liability for damages, direct or consequential, which may result from the use of TGraphicEdit.