[<<Previous Entry]
[^^Up^^]
[Next Entry>>]
[Menu]
[About The Guide]
TBrowse and Tables
----------------------------------------------------------------------------
Tables -Browses- are one of the most typical xBase elements.
Clipper has potentiated traditional 'Browses', with its predefined
Class TBrowse. Really, a Clipper TBrowse is more a 'Query' from
other environments instead of a 'dBase' Browse.
Thanks to Clipper's TBrowse we can perform very powerful queries on
a data base, selecting on different criteria, etc... Actually there is
a lot of documentation on how to get the maximum performance from a
Clipper TBrowse Object.
When we were implementing Clipper in Windows we founded some problems
typical to a graphical environment. Clipper's TBrowse is designed to
use absolute screen coordinates. In Windows there is no absolute
coordinates because the letters of a font use different widths.
So, it will be only possible to use a Clipper TBrowse if we decide
to use a predetermined letters width font.
FiveWin implements its own GT module -GTW.c- which has been designed
to use the Windows SYSTEM_FIXED_FONT font.
Due this limitations and because we wanted to enhance TBrowse
possibilities we decided to build our own TBrowse we have called
TWBrowse. Its way of working is practically the same as the TBrowse
class, so you will have no difficulties in adapting that class to
your needs using OOPS or just modifying its source code.
We have enhanced TWBrowse to have a nice 3D look and to give it
the ability to display Bitmaps.
Lets suppose we want to show the name and surname of a Client:
@ 2, 2 LISTBOX FIELD Client->Name, Client->Surname
This command creates a TWBrowse Object which display the desired
information on the screen in a Browse format.
Review the examples that comes with FiveWin to see how you should
use TWBrowse correctly.
If you are going to design a Dialog Box from a Resource editor and
you want to include a TWBrowse Browse, you have to specify in the
resource editor that you are going to use a 'personalized' control.
In Borland's Resource WorkShop this is accomplished by selecting the
button which has a 'key' picture on it, and that will open a Dialog
Box where you have to write the word TWBrowse. When the resource
is generated it will use that class build upon. Also you
must specify, in the same Dialog Box, its style. Make an 'OR' with
the current settings:
... | WS_BORDER | WS_TABSTOP | WS_VSCROLL | WS_HSCROLL
Look inside the DLLs (using your resource editor) we provide as
examples with FiveWin to check the correct way of doing it. Open
those DLLs from the resource editor and check how a TWBrowse is
designed.
Have a look inside BorlDlg.dll we supply.
See Also:
This page created by ng2html v1.05, the Norton guide to HTML conversion utility.
Written by Dave Pearson