home *** CD-ROM | disk | FTP | other *** search
/ Monster Media 1994 #1 / monster.zip / monster / PROG_BAS / DGDEMO.ZIP / TGDEMO.TXT < prev    next >
Text File  |  1994-01-27  |  54KB  |  724 lines

  1. !!! This file is used by TGDEMO.MAK ... you don't need to read it. !!!
  2.  
  3. %1Intro:1  Introduction to TrueGrid
  4. %1Using:2  Using this demo program
  5. %1ProdInfo:3  TrueGrid Product Information
  6. %2PIFeatures:TrueGrid Features
  7. %2PIPricing:Pricing and Ordering Information
  8. %2PIApex:About Apex Software Corporation
  9. %1StdDemo:4  Introductory Demos
  10. %2*Demo #1:Demo 1: Simple bound TrueGrid
  11. %2*Demo #2:Demo 2: Combining TrueGrid with other bound controls
  12. %2*Demo #3:Demo 3: Interaction with database code
  13. %2*Demo #4:Demo 4: Multiple selection
  14. %2*Demo #5:Demo 5: TrueGrid and SQL
  15. %2*Demo #6:Demo 6: Linking multiple TrueGrid controls
  16. %2*Demo #7:Demo 7: Using TrueGrid without a database
  17. %1AdvDemo:5  TrueGrid Pro Features
  18. %2*Demo #8:Demo 8: DropDown Editing Features
  19. %2*Demo #9:Demo 9: Drag and Drop
  20. %2ValList:About Value Lists
  21. %3*Demo #10:Demo 10: Simple Value Lists
  22. %3*Demo #11:Demo 11: Combo Box Value Lists
  23. %3*Demo #12:Demo 12: Radio Button Value Lists
  24. %3*Demo #13:Demo 13: Pictures in Value Lists
  25. %2Splits:About Splits
  26. %3*Demo #14:Demo 14: Simple Splits
  27. %3*Demo #15:Demo 15: Locked at left
  28. %3*Demo #16:Demo 16: Custom Splits
  29. %3*Demo #17:Demo 17: Independent Splits
  30. %2Colors:About Colors and Fonts
  31. %3*Demo #18:Demo 18: Color and Font Properties
  32. %3*Demo #19:Demo 19: Per-cell Colors/Fonts
  33. %2*Demo #20:Demo 20: Column Summaries
  34. %2*Demo #99:Demo 99: TrueChess (just for fun)
  35. %1TechDemo:6  How the Demo Navigator works
  36. # Using
  37. This demo program has been designed to allow you to
  38.  (a) Read about TrueGrid's capabilities
  39.  (b) Experiment with working demos
  40.  (c) Peruse working TrueGrid source code
  41.  (d) Get started with development!
  42.  
  43. >> Using the NAVIGATOR
  44.  
  45. The main form is called the Navigator and consists of two "panes".  The top pane shows the outline of all demo topics.  Some of the topics are informational (those in bold and in italic) while others represent demos.
  46.  
  47. You can select an entry with the mouse, or use the keyboard arrows to navigate in the outline.  When you are positioned on a demo, the "TryIt" button is enabled.  You can run the demo by clicking "TryIt" or by double clicking on the name of the demo in the outline.
  48.  
  49. The bottom pane in the Navigator shows the text associated with the outline item you've selected.  You can scroll through the information using the scrollbar.  You can move between the outline pane and the text pane by using the Tab key.
  50.  
  51. >> Running the demos
  52.  
  53. When you are positioned to a demo in the outline, the text pane shows a brief introductory description of the demo.
  54.  
  55. When you run the demo, the text pane changes to a complete discussion about the demo's features and how it was implemented.  The demo discussion text will appear in blue to differentiate it from the quick introductory text.
  56.  
  57. >> Examining the demos
  58.  
  59. Each demo is numbered.  The demo number appears in the outline, and on the title bar of the running demo.  For each numbered demo there is a form called TGDEMOXX.FRM, where XX is the number of the demo.  This makes it easy to find the code associated with a particular demo.
  60.  
  61. The demos are completely self-contained and contain only the code relevant to the feature being shown.  Each demo has a single line of code in the Form_Unload which is used to integrate the form with the demo.  Otherwise, you can take the demo forms and use them directly in other applications.
  62.  
  63. >> Using TRUEDEMO.VBX
  64.  
  65. This demo uses a special version of TrueGrid Pro called TRUEDEMO.VBX.  This VBX will work ONLY AT DESIGN-TIME (you cannot compile your applications).  In all other respects, the VBX is 100% functional.  You can even try doing some developing using this VBX to see how you like TrueGrid.  However, any demo grids you design will not work with an actual copy of the TrueGrid product once you receive it.
  66.  
  67. # StdDemo
  68. These introductory demos show how easy it is to use TrueGrid to display and manage database (and other) data.
  69.  
  70. All of the demos in this section work in both the TrueGrid Standard Edition product and the TrueGrid Pro product.
  71.  
  72. Each demo is numbered, and the demo is self-contained within a form with the same number.  So, you can look at the code for Demo 3 by examining the form TGDEMO3.FRM.  Each "frame" contains introductory text telling you what the demo does.  When you click "TryIt", the text will change to a complete explanation of the feature in the demo.
  73.  
  74. You should run these demos before moving on to the advanced demos for TrueGrid Pro features.
  75.  
  76. # AdvDemo
  77. These demos show the advanced features of TrueGrid Pro.  All of the demos in this section work only in the TrueGrid Professional Edition product.
  78.  
  79. Each demo is numbered, and the demo is self-contained within a form with the same number.  So, you can look at the code for Demo 10 by examining the form TGDEMO10.FRM.  Each "frame" contains introductory text telling you what the demo does.  When you click "TryIt", the text will change to a complete explanation of the feature in the demo.
  80.  
  81. # ValList
  82. TrueGrid has a powerful feature called "Value Lists".  Value lists are used to associate a set of values with a particular column.  Value lists can be the names of valid states, departments, status codes, or any other list of values which are possible for a column.
  83.  
  84. These demos show how value lists can be used for a variety of purposes.  Value lists can be used for simple input validation, or can be used to automatically "drop-down" a combo box containing possible values.  Value lists can also be used to "remap" data values into their corresponding displayed values, and even to define pictures which represent particular column values.
  85.  
  86. The important thing about value lists is that TrueGrid manages them automatically, all you do is define the list of values for a column.
  87.  
  88. # Splits
  89. If you use Excel or Microsoft Word for Windows, you may already be familiar with the idea of splits.  A "split" refers to the ability to divide a displayed document into "views", showing you the same data but at a different horizontal or vertical position.
  90.  
  91. TrueGrid manages splits automatically, and provides a powerful set of features for using splits in your applications.  Interactive splits (those which you allow users to use and configure) are controlled using small black "split boxes" which appear adjacent to the horizontal scrollbar at the bottom of the grid.
  92.  
  93. Using TrueGrid, users may split the grid any number of times to create stationary columns, then scroll other splits to bring hidden columns into view.  In your applications, splits can be locked so they appear to be "panels" of data on the display.
  94.  
  95. To make things even easier, TrueGrid makes it easy to specify that one or more columns should be "locked at left" at design-time.  The TrueGrid design-time layout editor automatically sets up the splits to achieve this effect.
  96.  
  97. These demos show many of the split features.  By looking at the demo forms themselves, you can find out what is needed to set up the split features, and can experiment with them yourself.
  98.  
  99. # Colors
  100. TrueGrid contains complete support for colors and fonts on a per-column, per-grid, and per-cell basis.  These demos show how TrueGrid's color and font properties can be used to create effective grid interfaces.
  101.  
  102. TrueGrid has four types of color and font support:
  103.  
  104. 1. Properties such as ForeColor, BackColor, HeadForeColor, SelectedForeColor, etc. allow you to associate colors and fonts with specific aspects of the grid at design time.
  105.  
  106. 2. "Pattern matching" properties, such as ColumnAddRegexAttr, allow you to tell TrueGrid to automatically apply colors and fonts to cells based upon text patterns in the cell.  This is a very flexible technique which is totally automatic once configured.
  107.  
  108. 3. "Cell status" properties allow you to pre-configure TrueGrid to apply colors and fonts to cells which have a certain status.  Status can be "current cell", "selected cell", "updated cell", etc.  These properties make it possible to change TrueGrid's default colors and fonts for standard cell highlighting.
  109.  
  110. 4. A special event, FetchAttributes, allows you to decide what cell colors should be used dynamically as cells are displayed.  This is the most flexible technique, allowing you to make cells, rows, and columns have any attributes you want based upon virtually any critieria you choose.
  111.  
  112. The following demos show how some of these properties can be combined.
  113.  
  114. # TechDemo
  115. If you're adventurous, you may be interested in how the demo navigator works.
  116.  
  117. The demo navigator is somewhat more complicated than the included demos, mainly because it isn't really intended as a demo at all.
  118.  
  119. However, it does perform some tasks which are not shown elsewhere.
  120.  
  121. >> Features of interest:
  122.  
  123. The navigator uses TrueGrid's outlining features to control the outline indent level in the outline grid.  A special event, FetchMargins, allows you to change the indent level used on a per-cell basis.  The navigator code stores the indent level when it reads the outline information from the tgdemo.txt file, then controls the outline indentation in FetchMargins.
  124.  
  125. The fonts and highlighting in the demo outline are controlled using the SetStatusAttr command, which specifies how the current cell looks.
  126.  
  127. We leave it up to you to explore the code in the navigator.  We've tried to comment it well so you can understand what's happening.
  128.  
  129. # Intro
  130. Welcome to the TrueGrid Pro demonstration package.
  131.  
  132. You are in the NAVIGATOR, which allows you to read about TrueGrid features, browse through the various demos, and execute them by pressing the "TryIt" button when it is enabled.  The top pane shows and outline of topics and demos.  The bottom pane shows you the text associated with each topic.  You can scroll through the topic list or text pane by using the appropriate scrollbar.  You can also resize the NAVIGATOR window so you can see more or less text.
  133.  
  134. Read this introduction first, then choose the topics you are interested in.
  135. -----
  136. TrueGrid is a bound database browser grid for Visual Basic 3.0 Data Access.  It is remarkably easy to use, extremely capable, and priced sensibly.  Our goal in designing TrueGrid was to provide you with high performance, high productivity, and good value.
  137.  
  138. TrueGrid is available in two versions: TrueGrid Standard Edition, and TrueGrid Professional Edition.  This demo shows the features of both.  The first set of demos ("Introductory Demos") shows features common to both.  The second set of demos ("TrueGrid Pro Demos") shows features available only in the professional edition.
  139.  
  140. For information about specific product features, pricing, and ordering information, see the topic entitled "TrueGrid Product Information".
  141.  
  142. # ProdInfo
  143. These three sections provide detailed information about TrueGrid features, pricing, and about Apex software and how to reach us.
  144.  
  145. You can review this information before or after running the demos.  For the most part, the demos show most of the important features and explains them as well.
  146.  
  147. # PIApex
  148. Apex Software Corporation was founded in 1988 and has specialized in database software and tools.  Our first product was FrontRunner, a pop-up dBASE programming environment for DOS, introduced in 1988.  Since then, Apex has released a variety of database products, including ADL (a dBASE database library), Agility (an innovative database package for Visual Basic and Visual C++), as well as TrueGrid.
  149.  
  150. You can reach us:
  151.  
  152.  1-800-858-APEX (orders)
  153.  1-412-681-4738 (support)
  154.  1-412-681-4343 (other calls)
  155.  1-412-681-4384 (FAX)
  156.  
  157. E-mail addresses:
  158.  
  159.  CompuServe:  71053,1062
  160.  Internet:  truegrid@apexsc.com
  161.  
  162. Mailing address:
  163.  Apex Software Corporation
  164.  4516 Henry Streety
  165.  Pittsburgh, PA 15213
  166.  
  167. # PIFeatures
  168. TrueGrid is available in both a Standard Edition for simpler database applications and a full featured TrueGrid Pro version.
  169.  
  170. >> Features common to both TrueGrid products:
  171.  
  172. 1.  Drop-and-go behavior.  Drop the grid on the form and setting DataSource are all you need to do to have a working, editable, data grid.  
  173.  
  174. 2.  Responds to changes you make to the Data control or Dynaset using a deferred response scheme.  So, if your program does a MoveNext 10 times, the grid will respond only once by moving the highlighted row.  This makes programming effortless, since the grid worries about efficiency and all you worry about is you program.
  175.  
  176. 3.  Updatable.  Records can be changed in the grid and are updated automatically to the database.
  177.  
  178. 4.  Handles databases of any size.  No memory overhead for large tables.
  179.  
  180. 5.  Responds to database movement, queries, FindFirst, Refresh, UpdateData, UpdateControls, RecordSet changes via SQL, etc.  In other words, everything you do will be reflected in the grid.
  181.  
  182. 6.  Automatic per-column edit masks using Format$ strings.
  183.  
  184. 7.  Column layout can be set up at design time, using the Layout Editor, or will automatically be derived at runtime.
  185.  
  186. 8.  Column properties for fieldname, heading, data size, column width, editability, justification, edit mask.
  187.  
  188. 9.  Per-column validation routines.
  189.  
  190. 10. Works with all database formats supported by VB3.
  191.  
  192.  
  193. >> Additional features for TrueGrid Pro:
  194.  
  195. 1.  Customizable color schemes, 3D appearance, row highlighting styles.
  196.  
  197. 2.  Individual column control including unbinding, calculating, locking capabilities.
  198.  
  199. 3.  Ability to set color and font style on a per column, or cell basis.
  200.  
  201. 4.  Use conditions to determine individual cell appearance.
  202.  
  203. 5.  Display data using multi-line rows and edit drop downs.
  204.  
  205. 6.  Create multiple Excel-like splits.
  206.  
  207. 7.  Built-in value lists allow you to create coded fields which are automatically translated into their displayed values by TrueGrid.
  208.  
  209. 8.  Enhanced layout editor allows control over locked columns, splits, fonts, justification, and column calculated expressions.
  210.  
  211. 9.  Enhanced runtime properties for accessing cell locations, displaying your own controls within cells, and for drag-and-drop implementations.
  212.  
  213. 10. Automatic column summing capabilities.
  214.  
  215. 12. Multiple layouts allow you to instantly switch between various column and split configurations.
  216.  
  217. 13. Built-in drop-down combo box for value lists, and drop-down capability for lookups in other databases.
  218.  
  219. 14. Radio buttons and checkboxes within cells.
  220.  
  221. # PIPricing
  222. TrueGrid is available in two versions:
  223.  
  224. TrueGrid Standard Edition ($69 US)
  225.     Supports full featured database browsing and in-cell editing.  Ideal for first-time grid users, home users, and small applications.
  226.  
  227. TrueGrid Professional ($149 US)
  228.     All the features of Truegrid Standard Edition, plus over 100 professional enhancements including calculated columns, splits, colors and fonts, column summaries, value lists, graphics in cells, and much more.
  229.  
  230. You can order TrueGrid directly from Apex by calling 1-800-858-APEX.  If you mention the demo program, you can purchase TrueGrid Professional for only $99.95 US!
  231. # *Demo #1
  232. This demo shows how simple it is to use TrueGrid using all of the default settings.  A form is displayed which shows the default TrueGrid, browsing a small customer database.
  233.  
  234. This demo contains no code whatsoever.
  235. # *Demo #1X
  236. This demo shows how simple it is to use TrueGrid using all of the default settings.
  237.  
  238. READ THIS FIRST, then click on the "Demo 1 - Simple TrueGrid" title to bring the demonstration form to the front so you can try it.
  239.  
  240. To create this demo, we did the following:
  241.  
  242. 1.  Put a data control on the form, and set it to the customer.dbf database.
  243. 2.  Dropped a TrueGrid on the form and set the DataSource property.
  244.  
  245. >> Observe:
  246.  
  247. This demo contains no code.
  248.  
  249. You can edit data, move from record to record, and rearrange or resize columns using the mouse.
  250.  
  251. To edit, click on a cell to make it current, then click again to enter cell editing mode.  You can also just begin typing and TrueGrid will enter edit mode automatically.  When done, press the ENTER key.  Note that the updated text will appear RED until you move the record pointer using the data control or by clicking on another row in the grid.  That's when the actual update occurs.
  252.  
  253. Notice that the grid will "listen" to anything you do with the data control.  Move the record pointer to the first record, the last record, or move forward or backward by one record at a time.  The grid automatically senses what you do and there is absolutely no coding necessary.
  254. # *Demo #2
  255. This demo shows how well TrueGrid and other bound controls work together.
  256.  
  257. A grid, combined with three Visual Basic Text controls work togther to browse and update data.  The grid properties have also been set to show the enhanced 3D appearance.
  258.  
  259. This demo contains no code whatsoever.
  260. # *Demo #2X
  261. This demo shows how well TrueGrid and other bound controls work together.
  262.  
  263. READ THIS FIRST, then click on the "Demo 2 - Multiple Controls" title to bring the demonstration form to the front so you can try it.
  264.  
  265. >> Observe:
  266.  
  267. This demo contains no code.
  268.  
  269. As you move the grid pointer by clicking on a cell, the text boxes automatically show the current row.  If you edit data in the grid, then change the row number, the text boxes will show the edited data (when you make that row current again).  Similarly, if you change data in a text box, then move the pointer, the grid automatically shows the updated data in the old row.
  270.  
  271. >> To create this demo, we did the following:
  272.  
  273. 1.  Put a data control on the form, and set it to the customer.dbf database.
  274. 2.  Dropped a TrueGrid on the form and set the DataSource property.
  275. 3.  Used the TrueGrid design-time layout editor to pre-configure the column layout and sizes for this demo.
  276. 4.  Put three text boxes, linked to individual database fields via their DataSource and DataField properties.
  277. 5.  Set TrueGrid properties HorzLines, HorzColor, VertLines, VertColor, BackColor and MarqueeStyle to enhance the grid appearance.
  278. # *Demo #3
  279. This demo shows how database actions taken by program code are automatically sensed by TrueGrid.
  280.  
  281. This is an enhanced version of Demo2 which contains buttons for Update, AddNew, Delete.  It also contains buttons for First, Next, Previous, and Last.  Although these duplicate the function of the data control, they demonstrate how methods like MoveFirst can be used to cause grid movement.
  282. # *Demo #3X
  283. This demo shows how database actions taken by program code are automatically sensed by TrueGrid.
  284.  
  285. READ THIS FIRST, then click on the "Demo 3 - Code Interaction" title to bring the demonstration form to the front so you can try it.
  286.  
  287. >> Observe:
  288.  
  289. This demo works like Demo2.  You can move the grid pointer as well as update data in the grid or text controls.
  290.  
  291. The Update button will force an immediate update.  For example, if you change a cell in the grid, but don't move to a new row, the edited cell changes color to let you know that the data was changed.  If you click Update, it forces the grid (and other controls) to write their data to the database.
  292.  
  293. The Delete button deletes the record you are currently pointing to (don't delete too many ... this file is used by other demos).
  294.  
  295. The AddNew button will create a new, empty record at the bottom of the grid.
  296.  
  297. >> To create this demo, we did the following:
  298.  
  299. 1.  Put a data control on the form, and set it to the customer.dbf database.
  300. 2.  Dropped a TrueGrid on the form and set the DataSource property.
  301. 3.  Used the TrueGrid design-time layout editor to pre-configure the column layout and sizes for this demo.
  302. 4.  Put three text boxes, linked to individual database fields via their DataSource and DataField properties.
  303. 5.  Created seven buttons and put the proper code in each (1-3 lines per button).
  304. 6.  Set TrueGrid properties HorzLines, HorzColor, VertLines, VertColor, BackColor and MarqueeStyle to enhance the grid appearance.
  305. # *Demo #4
  306. This demo shows how multiple records can be selected and highlighted using TrueGrid's BookmarkList feature.  Records can be selected manually, or multiple records can be automatically selected by providing an expression.
  307.  
  308. This demonstration is somewhat more complicated and shows quite a few features.
  309. # *Demo #4X
  310. This demo shows how multiple records can be selected and highlighted using TrueGrid's BookmarkList feature.
  311.  
  312. READ THIS FIRST, then click on the "Demo 4 - Multiple Selection" title to bring the demonstration form to the front so you can try it.
  313.  
  314. >> Observe:
  315.  
  316. This demo highlights several features, but mainly serves to demonstrate how multiple row selection can be performed.  Here are some things you may want to try:
  317.  
  318. 1.  Move the mouse to the leftmost edge of the grid ... a checkmark appears.  You can click to select a row, or click to deselect one which is already selected.
  319.  
  320. 2.  The horizontal scroll bar allows you to move from one selected row to another.  Select a few rows throughtout the database, then move from one to another using the scroll bar.
  321.  
  322. 3.  The "Clear All" button will deselect all of the selected rows.
  323.  
  324. 4.  At the bottom, the power of the grid's selection capability is illustrated by allowing an expression to be used to add items to the selection.  Choose one of the expressions from the combo box (or type your own if you wish), then click "Execute" to select each of the rows which matches the criteria.  The "Execute" button ADDS records to the selection, so click "Clear All" if you want to see only those which match.
  325.  
  326. Performing operations like those in this demo is very easy.  The best way to find out is to explore the code in the Demo4 form.
  327.  
  328. >> Other tidbits
  329.  
  330. This demo actually JOINs 2 databases using an SQL select statement which appears in the Data Control RecordSource property.  Although it's not really important to the selection capability, you may find this interesting anyway.
  331.  
  332. The Marquee has been changed to highlight only the current cell, while the selected rows are highlighted in blue.  You may want to experiment with the SelectedBackColor, SelectedForeColor, and MarqueeStyle properties to see what other combinations are possible.
  333. # *Demo #5
  334. This demo shows how TrueGrid responds to various SQL queries.
  335.  
  336. A grid is displayed with an area to enter SQL statements.  By creating queries, you can easily see how TrueGrid reconfigures itself to match the results of the query.  Some interesting queries are provided so you can quickly experiment with the demo.
  337. # *Demo #5X
  338. This demo shows how TrueGrid responds to various SQL queries.
  339.  
  340. READ THIS FIRST, then click on the "Demo 5 - SQL" title to bring the demonstration form to the front so you can try it.
  341.  
  342. >> Observe:
  343.  
  344. At the bottom of the demo form, there is an "Execute" button with an area for editing SQL statements just to the right.  At the very bottom, a drop-down provides some common SQL statements for you to try.
  345.  
  346. Notice that TrueGrid changes its column headings in order to satisfy the result of the SQL query.  Even queries such as:
  347.  
  348.    SELECT COUNT(*) FROM CUSTOMER
  349.  
  350. cause TrueGrid to display a single column which holds the result of the count.  (If you aren't that familiar with SQL, the above query results in a count of the total number of records in the table.)
  351.  
  352. Try each of the sample queries to see how they operate.  Then, if you wish, you may want to enter some SQL statements yourself to see how TrueGrid responds.
  353.  
  354. The code for this demo is quite simple.  The SQL statement is simply assigned to the data control's RecordSource property, then the Refresh method is used on the data control.  TrueGrid does the rest.
  355. # *Demo #6
  356. This demo links two grids together to show how related databases can displayed in multiple tables on a form.
  357.  
  358. A grid containing COMPOSERS is displayed, and another containing their COMPOSITIONS.  When you select a composer, the second grid automatically responds by showing just those compositions which belong to the selected composer.
  359.  
  360. This demo contains only a few lines of code, and illustrates how simply TrueGrid events can be used to create sophisticated interfaces.
  361. # *Demo #6X
  362. This demo links two grids together to show how related databases can displayed in multiple tables on a form.
  363.  
  364. READ THIS FIRST, then click on the "Demo 6 - Linked Grids" title to bring the demonstration form to the front so you can try it.
  365.  
  366. >> Observe:
  367.  
  368. The form contains two TrueGrids and two data controls.
  369.  
  370. The top grid and data control are linked to the COMPOSER.DBF database file, which contains a list of composers.
  371.  
  372. The bottom grid and data control are linked to the OPUS.DBF database file, which contains a list of compositions for composers.
  373.  
  374. Each database has a last name field, called "LAST".  When you click on a composer in the top grid, it automatically formulates an SQL query on the second data control.  This causes the second grid to respond and show the proper compositions.
  375.  
  376. All of the code is in the RowChange event handler for the top grid, which looks like this:
  377.  
  378.     lastname$ = Data1.Recordset("LAST")
  379.     Data2.RecordSource =
  380.          "SELECT * FROM OPUS WHERE LAST " + 
  381.          chr$(34) + lastname$ + chr$(34)
  382.     Data2.Refresh
  383.  
  384. RowChange is triggered each time the first grid detects that a new row has become current, whether by clicking on the grid, or by moving the current position using the data control (or Visual Basic code).  Thus, the list of compositions will always be kept current, no matter what is done to the first database.
  385.  
  386. Easy?  We think so.
  387. # *Demo #7
  388. This demo shows how TrueGrid can be used independently of a database.  Instead of automatically fetching data from a database, TrueGrid is configured so that the programmer provides the data to be displayed from any source they wish.
  389.  
  390. In the case of this demo, the grid is used to display a directory listing of the current directory, including file name, date, and file size.
  391. # *Demo #7X
  392. This demo shows how TrueGrid can be used independently of a database.
  393.  
  394. READ THIS FIRST, then click on the "Demo 7 - Non-database Mode" title to bring the demonstration form to the front so you can try it.
  395.  
  396. >> Observe:
  397.  
  398. TrueGrid contains a property, DataMode, which specifies whether or not TrueGrid is linked to a database, or whether it gets data in some application-defined way.  This latter mode is called "Application" mode, or sometimes "Callback" mode.  We like to call it "Callback" mode since TrueGrid "calls back" to the application each time it needs data.
  399.  
  400. This is different from the way other grids store data.  Instead of storing the data for you, TrueGrid simply requests what it needs when it needs it.  Thus, you can display millions or billions of lines of data if you have the data stored somewhere and can respond to TrueGrid's requests for fetching it.
  401.  
  402. In this demo application, a file directory listing is shown.  The DataMode is set to "Application" and each time TrueGrid needs information it calls the Fetch event.  In the Fetch event, file information is returned to TrueGrid, which it then displays.
  403.  
  404. Although programmers usually buy TrueGrid for its bound database capabilities, callback mode offers many advantages for displaying non-database data as well.
  405. # *Demo #8
  406. This demo shows several advanced features of TrueGrid, primarily the ability to "drop-down" another control (such as a combo box) so that field values may be more easily entered.
  407.  
  408. The grid displays a list of customer contacts, but only the customer code is available in the database.  Another database, containing customers, is "popped-up" when you click on the customer code in the contact list.
  409. # *Demo #8X
  410. This demo shows several advanced features of TrueGrid, primarily the ability to "drop-down" another control (such as a combo box) so that field values may be more easily entered.
  411.  
  412. READ THIS FIRST, then click on the "Demo 8 - DropDown Editing" title to bring the demonstration form to the front so you can try it.
  413.  
  414. Features illustrated by this example include:
  415.  
  416. 1.  Drop-down for user code.  Clicking on a cell in the "Code" column pops up a related database which shows the customer codes, with the customer name and company.  The drop-down is actually another TrueGrid control which was created independently and is kept on the form with its Visible property set to FALSE.  It is poppped up by the main grid in its RequestEdit event.
  417.  
  418. 2.  One key editing for "Call?" column.  Pressing "Y" or "N" in the "Call?" column will change the value to "Yes" or "No" without entering edit mode.  This is also done in RequestEdit.
  419.  
  420. 3.  Adding new records.  Pressing down-arrow on the last row automatically creates an empty row for adding a new record.  Moving off the record without filling it in cancels the add.  This is done with one line of code in the Append event for the main grid.
  421.  
  422. 4.  Calculated columns.  The secondary (pop-up) grid shows the user code and the name/company of the user.  The database actually contains a first name, last name, and company field.  A calculated column is used to show these as a single field.  This was set up in the layout editor's "Column Properties Dialog" at design-time.
  423.  
  424. 5.  The caption of the data control indicates the current row number, or specifies that the grid is "Adding a new record...".  This is handled by code in RowChange.
  425. # *Demo #9
  426. This demo shows how easy it is to create custom drag-and-drop interfaces using TrueGrid's DragCell event.
  427.  
  428. Two grids are used.  One contains a list of contacts, and the other contains a list of pending calls.  You can drag an entire contact, or just a phone number, and drop it in the appropriate place in the destination grid.
  429. # *Demo #9X
  430. This demo shows how easy it is to create custom drag-and-drop interfaces using TrueGrid's DragCell event.
  431.  
  432. READ THIS FIRST, then click on the "Demo 9 - Drag and Drop" title to bring the demonstration form to the front so you can try it.
  433.  
  434. The top grid is connected to the "Customers" table and includes a list of customers.  The bottom grid is the "CallList" table, which accumulates calls to be made.
  435.  
  436. Actions you can perform:
  437.  
  438. 1.  You can pick up an entire customer by grabbing any column except the phone number.  Dropping the customer into the bottom "CallList" grid will add a complete row to the call list.
  439.  
  440. 2.  You can pick up just the phone number from any customer and drop it into any of the existing phone number cells in the bottom grid.
  441.  
  442. In both cases, highlighting in the grids provides feedback so you know what is about to happen.  You can cancel the operation by moving back to the top grid and releasing the mouse button.
  443.  
  444. Such drag-and-drop interfaces are easy to implement using TrueGrid's DragCell event.  TrueGrid automatically determines that a drag is beginning, then notifies you about the cell location being dragged.  Your code can respond as you wish by dragging the cell, or the entire row using Visual Basic's drag-and-drop features.
  445.  
  446. TrueGrid also contains special properties (such as RowAtPoint and ColumnAtPoint) so you can find out which cell the user is pointing to in the destination grid.  Although these features are useful for drag-and-drop, they are also useful in a wide variety of other circumstances.  For example, you could update a status bar to provide help information about the field the user is currently on top of.
  447.  
  448. # *Demo #10
  449. This demo shows how pre-defined value lists can be used to translated "coded" database fields into more friendly text strings.
  450.  
  451. At design-time, a value list for the "Customer Type" column was defined that remaps values 1-5 to more meaningful values.  TrueGrid handles the rest.
  452. # *Demo #10X
  453. This demo shows how pre-defined value lists can be used to translated "coded" database fields into more friendly text strings.
  454.  
  455. READ THIS FIRST, then click on the "Demo 10 - Simple Value Lists" title to bring the demonstration form to the front so you can try it.
  456.  
  457. The value list itself was defined at design-time (you can inspect this by looking at TGDEMO10.FRM in design-mode).  Once defined, TrueGrid takes care of remapping the values 1 through 5 to text which describes the customer type.  To the grid user, it appears as if the text, rather than the numeric value, is actually stored in the database.
  458.  
  459. You can change the type of a customer by typing a new text string directly into the first column.  If the value you type isn't in the value list, TrueGrid will fire the ValidateError event, which (in this demo) displays a message box.
  460.  
  461. Two buttons at the bottom of the form allow you to tell TrueGrid to either use the value list (the default) or to show the raw numeric data in the file.  Only two lines of code are used in each button to change the display mode for the 
  462.  
  463. # *Demo #11
  464. This demo shows how pre-defined value lists can be used to display an automatic combo drop-down which allows the user to select a value for a field.
  465.  
  466. At design-time, a value list for the "Customer Type" column was defined that remaps values 1-5 to more meaningful values.  The value list type was set to "Combo Box", and TrueGrid automatically displays and manages the combo box when needed.
  467. # *Demo #11X
  468. This demo shows how pre-defined value lists can be used to display an automatic combo drop-down which allows the user to select a value for a field.
  469.  
  470. READ THIS FIRST, then click on the "Demo 11 - Combo Box Value Lists" title to bring the demonstration form to the front so you can try it.
  471.  
  472. This demo is identical to Demo #10, except that the value list style for Column 1 is set to "Combo Box" (at design-time), which tells TrueGrid to use a combo box presentation for the data in Column 1.
  473.  
  474. You can change the type of a customer by clicking on the "drop-down" button to display the combo, then clicking on a new customer type.  TrueGrid also allows you to type the value directly into the cell, and will automatically validate the entry just as it does without the combo box.
  475.  
  476. Two buttons at the bottom of the form allow you to tell TrueGrid to either use the value list (the default) or to show the raw numeric data in the file.  Only two lines of code are used in each button to change the display mode for the field.  Notice that the combo drop-down works for both the translated value, and the actual database value.
  477.  
  478. # *Demo #12
  479. This demo shows how pre-defined value lists can be used to display radio buttons in a cell.
  480.  
  481. At design-time, a value list for the "Customer Type" column was defined that remaps values 1-5 to more meaningful values.  The value list type was set to "Radio Buttons", and TrueGrid automatically displays and manages the radio buttons within the cell.
  482. # *Demo #12X
  483. This demo shows how pre-defined value lists can be used to display radio buttons in a cell.
  484.  
  485. READ THIS FIRST, then click on the "Demo 12 - Radio Button Value Lists" title to bring the demonstration form to the front so you can try it.
  486.  
  487. This demo is almost idential to Demos 10 and 11, except that the value list style for Column 1 is set to "Radio Button" at design-time, which tells TrueGrid to display the values as a set of radio buttons.
  488.  
  489. You can change the customer type by either (a) clicking on one of the radio buttons, (b) cycling through the radio buttons by using the space bar, and (c) pressing the first letter of one of the radio button options.  TrueGrid manages this interaction automatically.
  490.  
  491. As with the previous demos, the two buttons at the bottom of the form allow you to tell TrueGrid to either use the translated values (the default) or to show the raw numeric data in the file.  Only two lines of code are used in each button to change the display mode for the column.
  492.  
  493. # *Demo #13
  494. This demo uses value lists with an automatic picture translation table.  Numeric field values are automatically displayed as pictures by TrueGrid.
  495.  
  496. At design-time, two columns have value lists defined which include picture translations.  When fetching the data, TrueGrid translates the text or numeric data in the database into the corresponding picture.  TrueGrid also permits the picture to be changed by clicking on it.  One column uses this feature to simulate checkboxes for boolean values.
  497. # *Demo #13X
  498. This demo uses value lists with an automatic picture translation table.  Numeric field values are automatically displayed as pictures by TrueGrid.
  499.  
  500. READ THIS FIRST, then click on the "Demo 13 - Pictures in Value Lists" title to bring the demonstration form to the front so you can try it.
  501.  
  502. The "How" column shows a picture to denote how a contact was made: by phone, mail, or in person.  In the database, these values are represented by the numbers 0, 1, and 2.  At design-time, the "Cycle on click" option tells TrueGrid to automatically cycle through the values when the cell is clicked, making a convenient 3-state button in the cell.
  503.  
  504. The "Recall?" column is a logical field which normally is displayed as "0" or "-1".  By associating pictures of a checkbox and enabling "Cycle on click", this cell behaves just like a standard checkbox, allowing you to click on it to change the state.
  505.  
  506. This form contains no code, by the way.  However, notice that you can still type directly into these cells.  Normally, you would customize this behavior by controlling how keyboard edits work in the RequestEdit event.
  507.  
  508. # *Demo #14
  509. This demo shows how simple interactive split capabilities can be enabled.
  510.  
  511. A TrueGrid control is displayed with default settings, except that splits have been enabled by setting the SplitLocked property to FALSE for the grid.
  512.  
  513. # *Demo #14X
  514. This demo shows how simple interactive split capabilities can be enabled.
  515.  
  516. READ THIS FIRST, then click on the "Demo 14 - Simple Splits" title to bring the demonstration form to the front so you can try it.
  517.  
  518. Notice that the TrueGrid control has a small black "split box" at the lower left.
  519.  
  520. >> Create a new split:
  521.  
  522. Drag the split bar to the right with the mouse to "lock" the first column in place.  Now, use the horizontal scrollbar on the right split to scroll through the available columns.
  523.  
  524. >> Customize one split:
  525.  
  526. You can rearrange and hide the columns in one split while leaving other splits intact.  In the right split you just created, scroll back to the leftmost column and hide the "Code" column by dragging the vertical line to its right to the far left to "close-up" the column.  Now the "Code" column appears only in the left split, but not in the right one.
  527.  
  528. >> Create more splits:
  529.  
  530. Adjust the existing split by dragging the black box (the one under the double vertical line) further to the right.  Now, create another split using the "new split box" at the far left.
  531.  
  532. >> Remove splits:
  533.  
  534. You can remove either of the new splits by "closing" the split.  Drag its split bar to the far right or far left to remove it.
  535.  
  536. This is a demonstration of the simplest way to use splits, where the user has complete control over the grid appearance.  All of the split characteristics can be controlled from code as well, and you can easily disallow user modification of splits.
  537.  
  538. # *Demo #15
  539. This demo shows how the automatic "locked at left" feature works.
  540.  
  541. At design-time, you can specify that certain columns are "locked at left" in order to fix them at the left of the grid.  TrueGrid automatically configures the split properties for you.
  542. # *Demo #15X
  543. This demo shows how the automatic "locked at left" feature works.
  544.  
  545. READ THIS FIRST, then click on the "Demo 15 - Locked at left" title to bring the demonstration form to the front so you can try it.
  546.  
  547. One of the more popular uses of splits is to lock columns at the leftmost portion of the grid so that they do not scroll.  To simplify this, the TrueGrid design-time layout editor has a "locked at left" checkbox for each column so you can tell TrueGrid to automatically set up the splits for you.
  548.  
  549. Notice that TrueGrid doesn't display a split box at the bottom, so the splits cannot be changed by the user.  In addition, TrueGrid will automatically "track" the size of the locked columns if you adjust their size.  Try adjusting the size of the "First" column by moving the vertical line to its right.  The "locked split" area conforms to the column sizes automatically.
  550.  
  551. There is no code necessary to accomplish this ... TrueGrid does it all automatically.
  552.  
  553. # *Demo #16
  554. Splits can be fully customized.  This demo shows how setting some simple design-time properties can employ splits for special purposes.
  555.  
  556. A grid containing two fixed areas and a central splittable region is shown.
  557. # *Demo #16X
  558. Splits can be fully customized.  This demo shows how setting some simple design-time properties can employ splits for special purposes.
  559.  
  560. READ THIS FIRST, then click on the "Demo 16 - Custom Splits" title to bring the demonstration form to the front so you can try it.
  561.  
  562. The grid contains three splits which were set-up at design-time in the layout editor:
  563.  
  564. Left split - this split has one column which is "unbound" and is used to show the current row number.  It is also configured to be a "selection" column.  The checkmark cursor which appears in that column allows you to select one or more rows.  This split is "locked" so the user can't reconfigure it.  It appears to be more like a panel than a split region.
  565.  
  566. Center split - this split contains the main data from the database.  It is "unlocked", so notice that it has a split box of its own.  You can split the center area again interactively.  (This can be disabled, of course.)
  567.  
  568. Right split - this split contains just one of the columns from the database, with a value list.  It is also a fixed split (like the left one) and cannot be removed or reconfigured by the user.
  569.  
  570. >> How it was done...
  571.  
  572. At design-time:
  573.  
  574. - SplitLocked was set to FALSE, enabling design-time split features.
  575. - SplitPropsGlobal was set to FALSE, making each split have it's own set of properties.
  576.  
  577. Then, then layout editor was used to create the splits and configure the columns in each split.
  578.  
  579. After the splits were layed out, the SplitIndex property was used to "move" to each split and set its properties separately.  The left and right splits were locked using SplitLocked and the left split was configured to allow checkmark selections.
  580.  
  581. # *Demo #17
  582. This demo shows how two splits can be "unlinked" so that they scroll independently.
  583.  
  584. TrueGrid supports the notion of "split groups".  Any number of splits can be grouped for independent vertical scrolling.  This makes it easy to view different parts of the database using the same grid control.
  585. # *Demo #17X
  586. This demo shows how two splits can be "unlinked" so that they scroll independently.
  587.  
  588. READ THIS FIRST, then click on the "Demo 17 - Independent Splits" title to bring the demonstration form to the front so you can try it.
  589.  
  590. The form contains a single TrueGrid control with two pre-defined splits.  Notice that each split has its own vertical scrollbar.
  591.  
  592. Using the vertical scrollbars, you can see how each split can be moved to an independent location within the database.
  593.  
  594. When you click on a row, TrueGrid selects the row in both splits so both are visible, although they may not be aligned with one another.
  595.  
  596. >> How it was done ...
  597.  
  598. A TrueGrid control was placed on the form and pre-configured to have two splits.  With SplitPropsGlobal set to FALSE, the SplitGroup number of the left split was set to 1 and the SplitGroup number of the right split was set to 2.  TrueGrid automatically shows multiple vertical scrollbars when splits are unlinked in this fashion, although you can change this default behavior if you wish with the VertScrollbar property.
  599.  
  600. # *Demo #18
  601. This demonstrates how simple properties for changing column and grid colors can be used for different effects.
  602.  
  603. TrueGrid has a variety of properties which can change various color attributes of the entire grid or of individual columns.
  604.  
  605. # *Demo #18X
  606. This demonstrates how simple properties for changing column and grid colors can be used for different effects.
  607.  
  608. READ THIS FIRST, then click on the "Demo 18 - Color and Font Properties" title to bring the demonstration form to the front so you can try it.
  609.  
  610. The form contains a TrueGrid control which display several of the simpler features available for setting colors and fonts:
  611.  
  612. - Column colors can be set by changing a single property.  The 'Company', 'Contacted', and 'UserCode' columns were set up in this way.
  613.  
  614. - Column fonts can be set as well, as in the 'UserCode' column.
  615.  
  616. - Each split has its own settings for colors and fonts.  Notice that the color of the horizontal lines is different for the "fixed" split on the left.
  617.  
  618. - The heading font can be changed as well, and can be set on a per-split, or per-column basis.
  619.  
  620. All of these settings are dynamic and can be changed at runtime to achieve any desired effect.
  621.  
  622. If you use the split bar to creaete a new split, you will notice that TrueGrid automatically causes color and font settings to be inherited by the newly created split.
  623.  
  624. >> How it was done...
  625.  
  626. A TrueGrid control was bound to the database.  The SplitPropsGlobal property was set to False so that settings could be applied independently for each split.
  627.  
  628. In the layout editor, the fixed column was created.  The font weight for 'UserCode' was set at design time, as were the fonts used for the headings.
  629.  
  630. At runtime, Form_Load was modified to contain settings for ColumnForeColor and ColumnBackColor properties.  These were changed to set the colors for the 'UserCode', 'Company', and 'Contacted' columns.
  631.  
  632. # *Demo #19
  633. This is a very practical example of how per-cell colors and fonts can be used to convey relationships between data.
  634.  
  635. A corporate task list is shown.  Colors and fonts are used to highlight tasks which are overdue, not yet done, and to point out the relationship between projects and the departments working on them.
  636.  
  637. # *Demo #19X
  638. This is a very practical example of how per-cell colors and fonts can be used to convey relationships between data.
  639.  
  640. READ THIS FIRST, then click on the "Demo 19 - Per-cell Colors/Fonts" title to bring the demonstration form to the front so you can try it.
  641.  
  642. Colors and fonts are used creatively in this form to show both task status and relationships between tasks.
  643.  
  644. >> The form shows a corporate task database:
  645.  
  646. Task: The name of the task.  Tasks which are yet to be completed are highlighted with a light yellow background.
  647.  
  648. EntryDate: The date the original task was scheduled.  By default, the table is sorted in order by this date.  (You can change the sort order by clicking on a heading with the right mouse button ... but not yet).
  649.  
  650. Target: This is the anticipated completion date of the task.  Any tasks which are overdue are shown in red italics.  The form "thinks" it's 12/20/93 so you'll note that three tasks have not been completed by that date.
  651.  
  652. Done: Indicates that a task has been completed.  If incomplete, the word "No" appears here in boldface type and the task name appears with a light yellow background.
  653.  
  654. Project: Each project has a code name.  Because several projects are in progress at all times, tasks for various projects are interwoven in the list.  When a task is selected, the project name is highlighted in light blue, as are all other tasks for that project.  This makes it easy to see at a glance which tasks are related to one another by project.
  655.  
  656. Department: Each task is assigned to a particular department. Like project column, the department associated with the current row is highlighted in light blue wherever it appears.  This draws your attention to other tasks which are being done by the same department.
  657.  
  658. >> Things to try:
  659.  
  660. Click on various rows within the task list and notice how the highlighting makes it easy to determine how projects, departments, and tasks are related.
  661.  
  662. It is easy to spot tasks which are overdue (looking at the Target column) and tasks which are pending (shown with a yellow background).
  663.  
  664. The table is shown sorted in order by the column whose title is underlined.  You can change the sort order by clicking on the heading with the right mouse button (the left button is used to rearrange the columns).
  665.  
  666. >> How it is done:
  667.  
  668. This demo illustrates several techniques for working with colors and fonts.
  669.  
  670. 1.  The FetchAttributes event contains code to (a) highlight pending tasks in yellow, (b) show overdue tasks with a red italic target date.
  671.  
  672. 2.  TrueGrid has a set of color and font features which automatically perform pattern matching on cells and set attributes according to a list of colors and fonts for each pattern.  This is completely automatic once it's set up, and TrueGrid assures that cells have the proper color and font even when new data is displayed, rows are deleted, or rows are added.  The "Done" column has a pattern defined for "No" values so that they appear in bold.  The "Project" and "Department" column uses the same feature, but changes the pattern each time the row changes.
  673.  
  674. 3.  The MouseDown event is used to detect a click within the heading region, and uses the ColumnHeadFontStyle property to underline the heading to indicate which column defines the sort order.
  675.  
  676. # *Demo #20
  677. This demo shows how to keep totals for columns and display them in separate text boxes outside of the grid.
  678.  
  679. TrueGrid contains a unique feature, tailored for row-oriented data display, which automatically keeps totals for columns as data is refreshed and modified.
  680.  
  681. # *Demo #20X
  682. This demo shows how to keep totals for columns and display them in separate text boxes outside of the grid.
  683.  
  684. READ THIS FIRST, then click on the "Demo 20 - Column Summaries" title to bring the demonstration form to the front so you can try it.
  685.  
  686. TrueGrid has a special event, ColumnSumChange, which can be triggered automatically when the calcualted total for a column changes due to user modification or changes to the database or displayed data.
  687.  
  688. Unlike simpler spreadsheet-style summary calculations, TrueGrid is specially designed for large row-oriented table totalling.  TrueGrid calculates the total value of a column once.  Then, as data is modified, TrueGrid maintains an internal "delta" and keeps the total up to date without the need for constant recalculation.  Once enabled, TrueGrid handles all of the column summary maintenace and simply notifies your program with the ColumnSumChange event whenever the total changes for any reason (such as a database refresh, or user modification of cell data).
  689.  
  690. TrueGrid even has features so that you can "seed" the total using the SQL SUM() function so that TrueGrid doesn't have to pre-calculate the total by reading each record in the table.
  691.  
  692. >> How it is done...
  693.  
  694. This demo form shows how easy it is to use the summary feature.
  695.  
  696. Two columns, the "Cost" and "MSRP" columns have summaries enabled by setting ColumnSumEnable to True in Form_Load.  Then, when TrueGrid detects a change in the total, it triggers ColumnSumChange.  Code in the ColumnSumChange gets the current running total using the ColumnSum property and displays the appropriate value in the text boxes below the column.
  697.  
  698. # *Demo #99
  699. TrueGrid can be used to do a wide variety of unconventional tasks.  This demo uses TrueGrid to build a working chess gameboard.
  700.  
  701. Using callback mode (no database), chess pieces are displayed in cells and per-cell color properties are used to color the gameboard.  Pieces can be moved and dropped using the built-in drag-and-drop features.
  702.  
  703. # *Demo #99X
  704. TrueGrid can be used to do a wide variety of unconventional tasks.  This demo uses TrueGrid to build a working chess gameboard.
  705.  
  706. This is a fun, and interesting, example of how TrueGrid can be used for less conventional tasks.  Using callback mode, TrueGrid is used to display a chess gameboard.  You can move pieces by picking them up and dropping them on a blank space, or by capturing another piece.
  707.  
  708. As you might guess, this form doesn't worry about whether the moves you make are valid, but just keeps track of where the pieces are and where you move them to.  If you have a few months of free time on your hands, maybe you can enhance this form to play a reasonable game of chess!
  709.  
  710. >> How it works:
  711.  
  712. The demo contains hidden image controls containing the bitmaps for the chess pieces.  The location of the pieces is kept in an 8x8 integer array.
  713.  
  714. TrueGrid is configured in callback mode.  When it needs to display a cell, TrueGrid fires the Fetch event.  Code in the fetch event consults the piece location array to decide which picture to display in the cell.
  715.  
  716. When you attempt to drag a piece, TrueGrid fires the DragCell event.  Code in DragCell determines whether there is a piece on the given square, then sets a flag to indicate that a piece is in motion.  The DragOver takes care of updating the current target square's location.
  717.  
  718. All of the colors are controlled using the FetchAttributes event.  TrueGrid uses the FetchAttributes evnet to request the cell color for each cell displayed.  Normally, cells are either red or dark blue in order to create a checkerboard effect.  When a piece is being moved, code in FetchAttributes leaves the cell color alone so that the black background can show through in order to emphasize the target cell location.
  719.  
  720. This form doesn't rely on the standard "row marquee" to highlight the current row location, but uses the color settings in FetchAttributes for all highlighting and color display.  The row and column number are irrelevant to this demo.
  721.  
  722. This demo also uses a "trick" to cause the current cell to refresh with a minimum of flicker.  The Windows API SendMessage call is used to tell TrueGrid to refresh only the current square.  This is the only demo which uses such a trick.  All the others rely only on standard TrueGrid properties.  (However, if you find this useful, the technique is easy to use in your own applications.)
  723. #END
  724.