home *** CD-ROM | disk | FTP | other *** search
/ Monster Media 1994 #1 / monster.zip / monster / PROG_BAS / DGDEMO.ZIP / TGDEMO8.FRM (.txt) < prev    next >
Visual Basic Form  |  1994-01-25  |  5KB  |  105 lines

  1. Demo8
  2. Demo 8 - DropDown Editing
  3. Form15`    
  4. Table2
  5. TgDemo
  6. MS Sans Serif
  7. UserCode
  8. FirstName+" "+LastName+", "+Company
  9. Data2R
  10. Data2%
  11. OE.MDB
  12.     Customers
  13. Data2
  14. Data1%
  15. OE.MDB
  16. Contacts
  17. Data1
  18. Table1
  19. TgDemo
  20. MS Sans Serif
  21. UserCode
  22. ContactDate
  23. Call?
  24. Callback
  25. Yes/No
  26. Comments
  27. Comments
  28. Data1R
  29. Text1
  30. MS Sans Serif
  31. @    Form_Load
  32. Text1
  33. Form_Unload
  34. Canceld
  35. QuitCurrentDemo
  36. Table1_Append=
  37. Data1
  38.     Recordset
  39. Table1_LeftColChange
  40. Table2
  41. Visible
  42. Table1_RequestEdit
  43. KeyAscii
  44. Table1
  45. ColumnName
  46. ColumnIndex
  47. Leftz
  48. CellRectLeft
  49. CellRectTop
  50. CellRectHeight
  51. Data2
  52. NoMatch
  53. ColumnText
  54. Table1_RowChange
  55. EditMode
  56. Caption
  57. RowIndex
  58. Table1_TopRowChange
  59. Table2_DblClick
  60. Table2_LostFocus
  61. Form_Load
  62.  Put the legend text in the form's text boxx
  63. Illustrates:
  64.    - DropDown Editing (click on current cell in Code column)
  65.    - One key editing (type Y or N in Call? column)
  66.    - Automatic AddNew (press down arrow at last record)
  67.    - Memo field editing (click on current cel in Comments column)
  68. Form_Unload
  69. Table1_Append
  70.  AddNew triggers TrueGrid to "open up" a new
  71.  row for adding records.
  72. Table1_LeftColChange
  73.  When the grid scrolls, we make sure the pop-upr
  74.  is gone. 
  75. Table1_RequestEdit
  76.  RequestEdit is called each time you click on the
  77.  current cell.  You can decide what happens andh
  78.  whether standard editing proceeds.  This allows
  79.  you to substitute different kinds of editing for
  80.  the current cell, as is done here.o
  81.  The Code column will display a popup (hidden 
  82.  elsewhere as Table2) to allow selection.d
  83.  exit if they tried to overtypen
  84.  cancel built-in editing
  85.  Position the pop-up relative to the current cell
  86.  and find the item which matches the one currently
  87.  displayed in the main grid cell.t
  88. UserCode = 
  89. Call?
  90.  The Call column can be edited just by typinge
  91.  "Y" or "N", so we don't use the standardp
  92.  built-in editor.e
  93. Table1_RowChange
  94.  Change the data control caption to indicate whether
  95.  we are adding or browsing an existing row.e
  96. Adding new record...
  97. Record #
  98. Table1_TopRowChange
  99.  Hide the popup if we scroll. 
  100. Table2_DblClick
  101.  When an item is selected in the pop-up, copy its value
  102.  to the proper column in the main grid.,
  103. Table2_LostFocus
  104.  Hide the popup if it loses focus.
  105.