Friends All:
The original work and, the great merit is of Luis Krause Mantilla, author
of modified version of classes TCBrowse, TWBrowse, TCColumn and TScrollBar
that served as base for the creation of the new class "TSBrowse".
Credits: (People that have contributed at some time to get this new class)
Luis Krause Mantilla
Selim Anter
Stan Littlefield
Marshall Thomas
Eric Yang
John Stolte
Harry Van Tassell
Martin Vogel
Katy Hayes
José -
Hernan Diego Ceccarelli ( some ideas taked from his TWBrowse )
Antonio Carlos Pantaglione (
Toninho@fwi.com.br )
Ricardo Ramirez (TSBtnGet is an adaptation of his TBtnGet Class)
Gianni Santamarina
Ralph del Castillo
FiveTech (original classes)
Many thanks to all of them.
Even though I have included some ideas of my own crop, my work has
consisted mainly on assembling the pieces to build this new class.
TSBrowse is now, an independent control that inherits directly from
TControl class.
I have also included the suggestions and observations from friends that
have tested the prototype.
I'll apreciate your suggestions and observations to
complement and amend
this work.
My only interest, as professional of programming work for many years, is
count on a powerful tool to accomplish my work with greater efficiency and
better look.
The Browser, for me, is the most important tool if we talk about data base
management, no other control is compared to it.
Next, some of the facilities of this new class (those which I remember at
this moment, believ me, they are many):
1.- "TSBrowse" is based from its origin on the control by columns with
individual attributes on each one.
2.- You can control independently, for each column, the color attributes
defined as code blocks or directly with the numerical value of RGB
mixes.
You can handle for each column, the following color kits:
a).- Text and background in cells.
b).- Text and background in headers.
c).- Text and background in footers.
d).- Text and background in focused cells.
e).- Text and background in cells at editing time.
f).- Text and background in columns that controls the index.
g).- Text and background in focused cells when the browse is inactive.
h).- Grid lines.
The manage of colors goes up to cell level (not only lines or columns),
you'll see the sample programs.
Colors can be assigned All or Some for all of the columns or for specific
ones in a single statement with the "TSBrowse" method SetColor().
3.- The grid lines can be:
Full oBrw:nLineStyle := 1
Only vertical lines oBrw:nLineStyle := 2
Only horizontal lines oBrw:nLineStyle := 4
No lines oBrw:nLineStyle := 0
Dotted lines oBrw:nLineStyle := 5
3D look oBrw:nLineStyle := 3
The color is assigned apart (see previous point).
4.- You can control also for each column the following attributes:
a).- Text alignment (left, centered, right) in:
Cells.
Headers.
Footers.
b).- 3D look (true, false) for:
Cells.
Headers.
Footers.
c).- Different Fonts for:
Cells.
Headers.
Footers.
d).- Line height independently of font size for:
Cells.
Headers.
Footers.
5.- Frozzen and protected columns.
6.- Editable or not editable columns.
7.- You can control the cursor movement after editing as follows:
Right.
Down.
Up.
Left.
Next editable cell (right or down left).
Cursor movement can be also changed at runtime using the keys Ctrl+Shift+any arrow key, as well as activating the popup menu with right clicking on column's header.
8.- Edition starts just writing, not necessarily with Enter key or Double Click.
9.- You can exit editing mode by pressing: Up or Down arrow keys; Enter key or, if the edition was started on writing, with Left or Right arrow keys (as in Excel). The Esc key cancels editing mode with no change in the field.
10.- Using bPrevEdit and bPostEdit code blocks, you can control the value of variables used in footers when those were defined as code blocks.
See sample 7
11.- When the Browse regains focus (switching windows), it recovers the record and the cursor's position that had before losing focus, even though other windows are using the same data base and index.
12.- For compatibility, "TSBrowse" preserves the command format FIELDS, HEADERS, FIELDSIZES of TWBrouse, by creating automatically the columns. Columns can also be generated from predefined arrays of: data, headings and sizes, using the "TSBrowse" method SetCols().
13.- "TSBrowse" supports several RDD'S: DBFCDX, COMIX, ADS, SIX, DBFNTX,
as well as objects like oDbf, oCtx, oTree and Arrays.
(other RDD's can be added as soon as I get the definition of some database functions that they handle)
14.- Report method to print the browse contents.
See all Window samples
15.- Text Viewer.
16.- Use of bitmaps in cells, headers and footers.
17.- Synchronization through code blocks with other browses using "TSBrowse" method SyncChild().
18.- Filters based on indexes (specially useful with NTX).
19.- Automatic append using the "TSBrowse" method SetAppendMode(). When you press down arrow key at the last row, "TSBrowse" opens a virtual blank record that can be edited. Actual append is done when you complete the edition of the first editable field. Pressing Esc key annulates the virtual append.
20.- Columns movement at runtime dragging the mouse on headers (Drag & Drop), or also, activating the popup menu with right clicking on headers.
21.- Keyboard incremental search for fields of any type.
22.- Add, insert and delete columns from code.
23.- Automatic end column and phantom column (to stop scrolling and fill unused area).
See samples 2 and 4
24.- Control of vertical and horizontal scroll bars (activate or not).
See sample 4
25.- Cursor movements: PanLeft, Panright, PanHome and PanEnd as in Clipper's DBU program.
26.- Prevalidation of keys. You can disable the use of some keys through "TSBrowse" method lIgnoreKey().
27.- Automatic creation of columns taking the fields of the active or aliased data base with the "TSBrowse" method LoadFields().
28.- You can use in the same program, "TSBrowse" and Hernan's "TWBrowse".
29.- Fully bilingual Spanish / English.
30.- Assignment of related table (array) for field editing using a ComboBox for selection through "TSBrowse" method SetData().
See samples 2 and 6
31.- Footers can be defined as text or as code block.
See sample 7
32.- Same code applyes for dialogs and windows, with no tricks.
33.- Continuows edition with lAutoEdit instance variable.
See sample 6
34.- New Multiselect feature with SetSelectMode() Method.
See samples 1 and 3
35.- New BtnGet editing with TBtnGet Class from Ricardo Ramirez using SetBtnGet() Method.
See samples 2, 4, 6 and 7.
36.- New Multi-Line Feature. By simply using CRLF in headers, cells and
footers See samples 4 and 6.
37.- New Auto Delete feature with SetDeleteMode() Method. Delete rows
(records/items) by pressing Del key. All stuff handled by TSBrowse.
38.- New alignment managment of BitMaps by using code blocks in clause
ALIGN. See program SBALIGN.PRG
39.- New Super Headers feature with ADD SUPER HEADER command. See program
SBSUPERH.PRG
40.- Assign default values to records/items added with Auto Append Mode by
using new oBrw:aDefault instance variable.
42.- Vertical Text for headers using DT_VERT on ALIGN clause when define
columns. See samples 1, 3 and 4 in SBTEST.PRG.
43.- Logical fields are edited using a Check Box virtual control, this feature
is activated if you issue CHECKBOX clause when define columns. See
sample 4 in SBTEST.PRG
44.- Edition is done within a Non Modal dialog, so you can exit editing
mode by clicking at any part of the screen includding buttons, menus,
scroll bars, etc.
45.- ¡ It's Free !, etc.....
Use attached Build.bat to build sample programs.
Enjoy TSBrowse, best regards.
Manuel Mercado.
Salamanca, Gto., México.
mmercadog@prodigy.net.mx mmercadog@hotmail.com