home *** CD-ROM | disk | FTP | other *** search
- VERSION 2.00
- Begin Form CallForm
- BackColor = &H00808080&
- BorderStyle = 1 'Fixed Single
- Caption = "Callback Sample"
- ClientHeight = 2535
- ClientLeft = 1095
- ClientTop = 1770
- ClientWidth = 5430
- Height = 3225
- Icon = CALLBACK.FRX:0000
- Left = 1035
- LinkTopic = "Form1"
- ScaleHeight = 2535
- ScaleWidth = 5430
- Top = 1140
- Width = 5550
- Begin TrueGrid Table1
- AllowArrows = -1 'True
- AllowTabs = -1 'True
- BackColor = &H00C0C0C0&
- Editable = -1 'True
- EditDropDown = -1 'True
- ExposeCellMode = 0 'Expose upon selection
- FetchMode = 0 'By cell
- HeadingHeight = 1
- Height = 2265
- HorzLines = 1 'Single
- Layout = CALLBACK.FRX:0302
- LayoutIndex = 1
- Left = 120
- LinesPerRow = 1
- MarqueeUnique = -1 'True
- SplitPropsGlobal= -1 'True
- SplitTabMode = 0 'Don't tab across splits
- TabCapture = 0 'False
- TabIndex = 0
- Top = 120
- UseBookmarks = -1 'True
- Width = 5175
- WrapCellPointer = 0 'False
- End
- Begin Menu ExitMenuOption
- Caption = "E&xit!"
- End
- Begin Menu HelpMenuOption
- Caption = "&Help"
- Begin Menu HelpMenu
- Caption = "&Index"
- Index = 0
- End
- Begin Menu HelpMenu
- Caption = "&Using Help"
- Index = 1
- End
- Begin Menu HelpMenu
- Caption = "-"
- Index = 2
- End
- Begin Menu HelpMenu
- Caption = "&About Callback..."
- Index = 3
- End
- End
- ' ---------------------------------------------------------
- ' Copyright (C) 1994 Apex Software Corporation
- ' You have a royalty-free right to use, modify, reproduce,
- ' and distribute the TrueGrid sample application files
- ' (and/or any modified version) in any way you find useful,
- ' provided that you agree that Apex Software Corporation
- ' has no warranty, obligations, or liability for any sample
- ' application files.
- ' ---------------------------------------------------------
- 'Global constants that determine the size
- 'of the grid and its underlying array
- Const MAXROW = 10
- Const MAXCOL = 5
- 'This array is used to hold the data
- 'that the grid will display
- Dim GridData(1 To MAXROW, 1 To MAXCOL) As String
- Sub CenterForm (F As Form)
- ' Center the specified form within the screen
- F.Move (Screen.Width - F.Width) \ 2, (Screen.Height - F.Height) \ 2
- End Sub
- Sub ExitMenuOption_Click ()
- Unload CallForm
- End
- End Sub
- Sub Form_Load ()
- 'Centers the Form on the Screen
- CenterForm CallForm
- 'Set the number of rows and columns to be displayed
- Table1.Rows = MAXROW
- Table1.Columns = MAXCOL
- 'Sets some of the Column properties for the Grids columns
- For Ct = 1 To Table1.Columns
-
- 'Heading name to be displayed
- Table1.ColumnName(Ct) = "Column " & Str$(Ct)
-
- 'Display size of column
- Table1.ColumnWidth(Ct) = 10
-
- 'Data entry size of column
- Table1.ColumnSize(Ct) = 10
- Next Ct
- 'Initialize array with values
- For Ct = 1 To MAXROW
- For Ct2 = 1 To MAXCOL
- GridData(Ct, Ct2) = "(" & Str$(Ct) & "," & Str$(Ct2) & ")"
- Next Ct2
- Next Ct
- End Sub
- Sub HelpMenu_Click (Index As Integer)
- 'This event calls the WinHelp EXE and a location to goto based on which selection the user has chosen
- 'Case 4 shows the about box for the Callback sample
- Select Case Index
- Case 0
- HelpContext CallForm, HELP_CALLBACK
- Case 1
- HelpOnHelp CallForm
- Case 3
- About.Show 1
- End Select
- End Sub
- Sub Table1_Fetch (Row As Long, Col As Integer, Value As String)
- 'Set the display of the grid to the
- 'contents of the GridData array
- Value = GridData(Row, Col)
- End Sub
- Sub Table1_Update (Row As Long, Col As Integer, Value As String)
- 'Updates the GridData array with the new value
- 'passed in by the Value parameter, usually
- 'upon completion of data entry
- GridData(Row, Col) = Value
- End Sub
-