#####################################################################
# #
# Product: GPLookup Pack #
# For Delphi 4, -TGPDBLookupList, TGPDBLookupCombo & #
# Delphi 5 & TGPSearchEdit #
# C++ Builder [Enhanced substitutes for #
# TDBLookupListBox & TDBLookupComboBox] #
# Version: 1.3 #
# Author: Girish Patil #
# E-mail:
[email protected] #
# #
# Readme Date: January 24, 1999 #
# #
#####################################################################
CONTENTS
===============================
1. Files in ZIP
2. Installation
3. Components Usage Guide
4. Technical Nuances
5. Pricing, Ordering & Feedback
1. Files in ZIP
===============
- GPLookup.BPL Main component package library
- GPLookup.DCP Compiled package file
- GPEdtr.DCU Property editors compiled unit
- GPLookup.DCU Main components compiled unit
- GPLookupAbout.DCU About dialog compiled unit
- License.TXT Terms & agreement
- Readme.TXT Information & usage help
- OrderFrm.TXT Information for non-Internet based ordering
- Revisions.TXT History of enhancements & fixes
There are 2 sets of the BPL, DCP & DCUs; one in the D4 folder and
the other in D5.
2. Installation
===============
After you have unzipped the contents of GPLookup.ZIP to a folder of
its own (Referred to below as GPLookup_DIR):
- Run Delphi
- Close all projects (recommended)
- Choose Component|Install Packages... from the menu
- Click Add...
- Look in: GPLookup_DIR\D4 folder for Delphi 4 & C++ Builder
GPLookup_DIR\D5 folder for Delphi 5
- Select GPLookup.BPL & Click Open
The GPLookup Package should appear in the list of Design packages.
Look for "GPLookup Pack - The Essential Lookup Components"
- Click OK
A new tab titled "GPLookup" should appear on the
Component Palette, containing GPDBLookupList, GPDBLookupCombo &
GPSearchEdit
- Make sure GPLookup_DIR is included in the Library Path. To do this
Choose Tools|Environment Options... and open the Library page.
You are now ready to use the components in your applications.
* "VCL" below refers to the Standard VCL TDBLookupListBox &
TDBLookupComboBox
3. Components Usage Guide
=========================
Enhancements at a glance; how and when to use them:
How to read -
Method-Type Name(): Return-Type (if Method-Type is function)
Explanation
Property: Type/Default value
Explanation
Event: Type
Explanation
Common to TGPDBLookupList & TGPDBLookupCombo
--------------------------------------------
Properties
public
LastFindSucceeded: Boolean (readonly)
Stores the result of the most recent search key. If a matching
entry to the user keyed-in text was not found LastFindSucceeded
is set to False, if a match was found it is set to True.
ListValue: Variant
Current value of ListField.
published
About: string
Information on GPLookup Pack.
KeyIsUnique: Boolean/True
Specifies if the KeyField is part of a unique index. If Key is
NOT unique set to False to prevent multiple items from being
highlighted, else set to True.
ScrollBarTracking: Boolean/True
Set to True to monitor and move ListSource records as the List
ScrollBar ThumbStop is moved -- concurrent scrolling.
Set to False to update the List only on release of the
ThumbStop.
TagStr: string
Set any string value. Can be used just like Tag with a string
value.
ToolTips: Boolean/True
Set to True to automatically popup a hint window, showing full
text, when text overflows display width. Set to False to
disable feature. This property is totally independent of Hint &
ShowHint.
ToolTipsDelimiter: string
Used to separate ToolTip columns when more than one ListField is
displayed. Set any combination of characters (E.g. " | ").
Events
AfterSearchKey: TNotifyEvent
Triggers after the searching of a user entered (character) key.
When you need to do some extra processing after the user keyed-in
text has been searched for, use this event.
TGPDBLookupList
---------------
Properties
published
HighlightColor: TColor/clHighlight
Background color of the selected item.
HighlightFontColor: TColor/clHighlightText
Text color of the selected item.
LocateOnEnter: Boolean/False
Set to True to Locate or bring the selected item (highlight)
into view, when the user tabs into the List.
LocateOnExit: Boolean/False
Set to True to Locate or bring the selected item (highlight)
into view, when the user tabs out or exits the List.
Options: TGPDBLookupListOptions/[]
Customize List appearance by turning on/off any of the options.
loColLines - Draws a line separating columns.
loRowLines - Draws a line separating rows.
loTitles - Displays a title bar for all ListFields
with caption set to ListField.DisplayLabel.
ShowSearchText: Boolean/True
Set to True to show a hint window, just above the selected
item, indicating the text (SearchText) keyed-in by the user.
The window automatically disappears if:
- The interval between two (char) keys is > 2 seconds.
- Mouse is clicked on an item.
- Movement (Arrow) keys are used.
...
TitleColor: TColor/clBtnFace
Background color of the Title.
TitleFontColor: TColor/clBtnText
Text color of the Title.
TGPDBLookupCombo
----------------
Methods
public
function TextFoundInList: Boolean
Call this function to determine if the EditText, the text typed
in by the user, matches with a list item. TextFoundInList does
a case-insensitive, partial-key search into ListSource. Returns
True if a match was found, False if none was found.
Properties
public
EditText: string
Read this property to know the text displayed in the edit area.
It is the same as accessing the Text property. Set EditText at
run-time to change the Text in the edit area of the Combo.
published
AllowEditing: Boolean/False
Set to True to enable the Combo for editing and inserting
of records on the ListSource. A DBEdit control is shown,
automatically, depending on the value of ListSource.State.
AlwaysAutoSelect: Boolean/False
Setting to True forces the control to select all text in the edit
area when it gets focus, even if it got focus through a mouse click.
AutoChange: Boolean/True
Set to False to prevent the Combo from responding to
ListSource.Scroll events and displaying the current
ListField.Value. Has no effect on a bound(DataSource set)
Combo.
AutoComplete: Boolean/True
Set to False to prevent the Combo from filling in
(Quicken style) the rest of the text of the ListField, that
matches the keyed-in text.
AutoDropDown: Boolean/True
Set to False to prevent the Combo from dropping down the List,
automatically, when text is keyed into it.
CapitalAfterSpace: Boolean/False
Set to True to automatically capitalize keyed-in text,
following a Space character.
CapitalFirstLetter: Boolean/True
Set to False to stop capitalizing the first keyed-in letter,
in the Combo.
CharCase: TEditCharCase/ecNormal
The Combo imitates the behavior of a TEdit control, of
identical CharCase value, when displaying text.
DropDownOnEditClick: Boolean/False
If you want the List to drop down when the edit area of the
Combo is clicked set the property to True.
When DropDownOnEditClick is True the List drops down even if
the Combo has focus at the time of receiving the click.
DropDownOnEnter: Boolean/False
Set this property to True to cause the List to drop down when
the Combo gets input focus, either through a tab-in or
mouse-click.
DropDownWidthFromListFlds: Boolean/False
To allow the Combo to automatically calculate the width of the
drop-down list, by summing-up the display width of all the
list fields (Field.DisplayWidth), set this property to True.
If DropDownWidth is greater that 0 DropDownWidth is used,
even if DropDownWidthFromListFlds is True. If the total of
display width results to less than the value of (Combo) Width,
Width is used. Set to False to default drop-down list width to
Width.
ExitFillFirstIfBlank: Boolean/False
When this property is set to True and the Combo is left blank
while exiting it updates to show the first item in the list.
When DataSource is set the value of the property is ignored and
the Combo does not get updated.
HighlightColor: TColor/clHighlight
Background color of the selected item in the Drop-Down List.
HighlightFontColor: TColor/clHighlightText
Text color of the selected item in the Drop-Down List.
ListColor: TColor/clWindow
Background color of the Drop-Down List.
ListFontColor: TColor/clWindowText
Text color in the Drop-Down List.
MaxLength: Integer/0
Set a value > 0 to restrict the numbers of characters that
can be entered in the Combo.
Options: TGPDBLookupListOptions/[]
Customize Drop-Down-List appearance by turning on/off any of
the options.
loColLines - Draws a line separating columns.
loRowLines - Draws a line separating rows.
loTitles - Displays a title bar for all ListFields
with caption set to ListField.DisplayLabel.
RestrictToList: Boolean/False
To prevent the user, from typing any character that forms a string
that does not exist in the list, set this property to True. If
you don't want any validation to be performed on the input
character this property should be False.
TitleColor: TColor/clBtnFace
Background color of the Drop-Down-List Title.
TitleFontColor: TColor/clBtnText
Text color in the Drop-Down-List Title.
TriClkSelectAll: Boolean/True
Set to False to prevent the Combo from selecting all text
displayed when the user triple-clicks in the edit area.
This behavior can be seen in MS Outlook (Express).
Just start a new message, type in any of the fields and
triple-click.
ValidateErrMsg: string
Used in conjunction with ValidateOnAccept. Provide a custom
error message to display when no matching List record exists,
whenever the check is performed.
ValidateOnAccept: Boolean/False
Set to True to perform a check, when the ENTER or ALT+UP/DOWN
key is pressed, to see if a matching List item exists. If the
check fails a dialog with the ValidateErrMsg string pops-up.
Events
OnButtonClick: TNotifyEvent
Triggers when the Combo button is pressed.
OnChange: TNotifyEvent
Triggers when the text in the edit area(or dbedit) changes.
OnDblClick: TNotifyEvent
Triggers when the edit area(or dbedit) is double-clicked.
OnSpecialEvent: TSpecialEvent
Triggers when any of the following actions occur. The Event
parameter indicates what caused it.
TSpecialEventType = (seEnterKey, seDblClick,
seCloseUp, seDropDown, seGotFocus, seLostFocus,
seSysChar, seSysCommand, seSysKeyUp, seCancelMode);
TSpecialEvent = procedure (Sender: TObject;
Event: TSpecialEventType) of object;
Event Occurs when...
-------------------------------------------------------------------
seEnterKey ...ENTER Key is struck.
seDblClick ...Left mouse button is double-clicked in the edit.
seCloseUp ...Drop-down list closes up.
seDropDown ...Drop-down list shows.
seGotFocus ...Combo gets input focus.
seLostFocus ...Combo loses input focus.
seSysChar ...A menu combination like Alt+Space is pressed.
seSysCommand ...The System menu is invoked.
seSysKeyUp ...Any Alt combination is pressed. ShortCuts, Menu
hotkeys...
seCancelMode ...Some of the above events occur, just behind or
ahead of them. Also when a non-focusable control
(Panel) is clicked.
Please refer the WinApi help for more details on the above 4 Events.
TGPSearchEdit
-------------
Properties
published
SearchField: string
Select a field of SearchSource that you want to incrementally
search on. An Index on the SearchField might be required.
SearchSource: TDataSource
Select the TDataSource component connected to the Table you
desire to search into.
User defined types used by TGPDBLookupList & TGPDBLookupCombo
-------------------------------------------------------------
TGPDBLookupListOption = (loColLines, loRowLines, loTitles);
TGPDBLookupListOptions = set of TGPDBLookupListOption;
The above properties compliment the properties of VCL, which have
been retained in whole.
4. Technical Nuances
====================
There have been innumerable changes and fixes applied to VCL that
it is hard to list them all here. Below is a short list of
differences, some cosmetic, between the GPLookup Pack components
and VCL.
Celebrating the keen technical observer!
Fixes:
- Combo when placed on a Panel of an 'MDIMain' From:
Drop-Down-List close-up when Form Title is clicked; when a
non-focusable control is clicked; menu invoked using mouse or
keyboard.
- List when bound to a DataSource: You can now select the desired
item, using the mouse, on the first attempt. It was impossible to
do so with TDBLookupListBox.
- Combo Color change at design-time: Refreshing problem fixed. In the
TDBLookupComboBox a thin area, along the inner periphery, is left
unpainted and remains in the old Color.
- List scroll-bar click at design-time: You can now use the scroll-
bar at design-time to scroll through the List records, as in the
TDBGrid.
- List: Clicking the scroll-bar at run-time now sets focus to the
List.
5. Pricing, Ordering & Feedback
===============================
Pricing
-------
There are 3 editions of the product:
1. Trial Edition - US$ 0.
Only for use in the Delphi IDE.
2. Basic Edition - US$ 20.
You can use this edition in applications that you distribute
(deploy).
3. Professional Edition - US$ 36.
Basic Edition + complete source code of the components.
Please read and understand the accompanying licensing document in
"License.Txt".
Ordering
--------
You can order GPLookup Pack online over the Internet at
http://shareit1.element5.com/programs.html?productid=106211.
Alternatively, you can go to
http://www.shareit.com and enter the
PROGRAM NUMBER: 106211.
If you do not wish to order over the Internet, you have the option of
doing it via phone, fax or postal mail. Please open the file
"OrderFrm.TXT" for details.
Once you make the payment in your preferred mode:
- ShareIt! will send me an email notification, with YOUR EMAIL
address.
- Within 48 hours you will receive your appropriate deployment
edition by email -- your email should be working, of course.
MAKE SURE you give your email at the time of ordering.
Feedback
--------
Write-in to
[email protected]
- Give your suggestions.
- Put forth what you wish you had in the components.
- Report bugs.
- Any other feedback that you think is relevant.
- Those of you who will be looking at the source code
might have something to say too!