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

  1. Demo19
  2. Demo 19 - Per-cell Colors/Fonts
  3. Form15`    
  4. Table1
  5. TgDemo
  6. MS Sans Serif
  7. EntryDate
  8. EntryDate
  9. Project
  10. TaskGroup
  11. Target
  12. Target
  13. Production
  14. Production
  15. Marketing
  16. Marketing
  17. Operations
  18. Operations
  19. Accounting
  20. Accounting
  21. Legal
  22. Legal
  23. Department
  24. Department
  25. Person
  26. Person
  27. StartDate
  28. StartDate
  29. Duration
  30. Duration
  31. Data1R
  32. Data1%
  33. OE.MDB
  34. )select * from tasklist order by entrydate
  35. &Corporate Task Database as of 12/20/93
  36. Table1_ClickX
  37. Table1_Append
  38. Data1
  39.     Recordset
  40. Table1_MouseDown
  41. Button
  42. Shift
  43. Table1t
  44. PointXy
  45. PointY
  46. sortCol
  47. ColumnAtPoint
  48. RecordSource
  49. ColumnName*
  50. Columnsn
  51. ColumnHeadFontStyle
  52. GRF_INHERIT
  53.     GRF_UBOLD
  54. ColumnFieldV
  55.     GRF_UNDER
  56. GRF_UNDERLINE
  57.     GRF_ULINE
  58. Table1_RowChange#
  59. projCol
  60. deptCol
  61. TgFindColumn
  62. ColumnText(
  63. ParamBackColor
  64. CYANK
  65. ParamFontStyle
  66. INHERIT_FONT
  67. ParamForeColor
  68. INHERIT_COLORs
  69. ColumnHasRegex
  70. ColumnHasRegexAttr
  71. ColumnSetRegex
  72. ColumnAddRegex(
  73. ColumnAddRegexAttr
  74. lastProjValue
  75. lastDeptValue6
  76. ColorizeSimilarItems
  77. Table1_Update
  78. Value
  79.     Form_Load
  80. GRF_BOLD
  81. todaysDate
  82. ColumnCellAttrs
  83.     targetCol
  84. doneCol
  85.     colTarget@
  86. colDone
  87. Table1_FetchAttributes
  88. Status
  89. Split
  90. FgColor
  91. BgColor
  92.     FontStyle
  93. GRF_ITALIC
  94. targetText
  95. colTask
  96.     LT_YELLOW
  97.     ForeColor-
  98. DK_RED
  99. Form_Unload
  100. Cancel
  101. QuitCurrentDemo
  102. RowAtPointH
  103.  work variable
  104.  last value for current project 
  105.  last value for current department
  106.  todaysDate is used to simulate a current date
  107.  pre-lookup values for column numbers
  108. ColorizeSimilarItems
  109.  This subroutine assures that all projects and
  110.  departments which are the same as the current
  111.  row are highlighted.  This is done by using
  112.  TrueGrid's automatic pattern matching.  Weg
  113.  tell TrueGrid the color to use for matched patterns.
  114.  Lookup the column numbers so we don't have to
  115.  hardcode them.u
  116. TaskGroup
  117. Department
  118.  Set the colors/fonts which will be applied based upon
  119.  the pattern match.t
  120.  s$ will be the project name for the current row
  121.  There is a project: add a pattern to matcht
  122.  current project name anywhere it occurs int
  123.  the column.
  124.  Project is blank ... clear the pattern matching
  125.  Remember the last project so we don't cause
  126.  undue flicker.a
  127.  s$ is now the current department name.c
  128.  We have a department name.  Set a pattern
  129.  so similar departments are highlighted.
  130.  No department.  Turn off pattern colorization
  131.  for this column.T
  132.  Remember the last department value used.a
  133. Form_Load
  134.  Lookup frequently used column numbers for efficency
  135. Target
  136.  Simulate a fixed date so the display looks the same
  137.  all the time.
  138. 12/20/93
  139.  Set up the DONE column so that "No" is always ina
  140.  bold.
  141.  For the Target and Task columns, tell TrueGrid to
  142.  ask for attributes on a case-by-case basis in the
  143.  FetchAttributes event.a
  144.  Underline the EntryDate column since it represents
  145.  the initial sort order.
  146. EntryDate
  147. Form_Unload
  148. Table1_Append
  149.  Downarrow at the last row adds a new record.e
  150. Table1_FetchAttributes
  151.  Determine the cell attributes dynamically as they
  152.  are requested.c
  153.  The target date is in red italic if it's before
  154.  todays date.  We use ColumnText to fetch theo
  155.  date value from the column.
  156.  For tasks which aren't done, make sure that
  157.  the Task column has a yellow background.h
  158. Table1_MouseDown
  159.  The right button causes us to sort on the given column if
  160.  pressed in the heading area.o
  161.  Determine the column we clicked over.
  162. SELECT * FROM TASKLIST ORDER BY [
  163.  Reset the heading fonts, then set the selected
  164.  column so that it's underlined.
  165. Table1_RowChange
  166.  Upon a row change, color the project andl
  167.  departments which are the samer
  168. Table1_Update
  169.  If the data in the Project or Department columns
  170.  changes, then recolorize the grid to reflect similar
  171.  projects/departments.
  172. TaskGroup
  173. Department
  174.