home *** CD-ROM | disk | FTP | other *** search
/ CD Shareware Magazine 1999 April / CD_Shareware_Magazine_31.iso / Free / Prg / axgrid.exe / Projects / axGrid / Form1.frm (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1999-02-04  |  6.5 KB  |  206 lines

  1. VERSION 5.00
  2. Object = "{32A4927E-FB95-11D1-BF5B-00A024982E5B}#88.0#0"; "axGrid.ocx"
  3. Begin VB.Form Form1 
  4.    Caption         =   "Form1"
  5.    ClientHeight    =   5850
  6.    ClientLeft      =   60
  7.    ClientTop       =   345
  8.    ClientWidth     =   7065
  9.    LinkTopic       =   "Form1"
  10.    ScaleHeight     =   5850
  11.    ScaleWidth      =   7065
  12.    StartUpPosition =   3  'Windows Default
  13.    Begin VB.CommandButton Command5 
  14.       Caption         =   "Change"
  15.       Height          =   375
  16.       Left            =   1020
  17.       TabIndex        =   11
  18.       Top             =   4380
  19.       Width           =   855
  20.    End
  21.    Begin VB.CommandButton Command4 
  22.       Caption         =   "Clear"
  23.       Height          =   375
  24.       Left            =   120
  25.       TabIndex        =   10
  26.       Top             =   5250
  27.       Width           =   855
  28.    End
  29.    Begin VB.CommandButton Command3 
  30.       Caption         =   "Size 12"
  31.       Height          =   315
  32.       Index           =   4
  33.       Left            =   6150
  34.       TabIndex        =   8
  35.       Top             =   5235
  36.       Width           =   840
  37.    End
  38.    Begin VB.CommandButton Command3 
  39.       Caption         =   "StrikeThru"
  40.       Height          =   315
  41.       Index           =   3
  42.       Left            =   5055
  43.       TabIndex        =   7
  44.       Top             =   5250
  45.       Width           =   1035
  46.    End
  47.    Begin VB.CommandButton Command3 
  48.       Caption         =   "Underline"
  49.       Height          =   315
  50.       Index           =   2
  51.       Left            =   4140
  52.       TabIndex        =   6
  53.       Top             =   5250
  54.       Width           =   840
  55.    End
  56.    Begin VB.CommandButton Command3 
  57.       Caption         =   "Italic"
  58.       Height          =   315
  59.       Index           =   1
  60.       Left            =   3240
  61.       TabIndex        =   5
  62.       Top             =   5250
  63.       Width           =   840
  64.    End
  65.    Begin VB.CommandButton Command3 
  66.       Caption         =   "Font, Color, Bold"
  67.       Height          =   465
  68.       Index           =   0
  69.       Left            =   2145
  70.       TabIndex        =   4
  71.       Top             =   5250
  72.       Width           =   1065
  73.    End
  74.    Begin VB.CommandButton Command2 
  75.       Caption         =   "Add"
  76.       Height          =   375
  77.       Left            =   135
  78.       TabIndex        =   3
  79.       Top             =   4395
  80.       Width           =   855
  81.    End
  82.    Begin VB.CommandButton Command1 
  83.       Caption         =   "Delete"
  84.       Height          =   375
  85.       Left            =   135
  86.       TabIndex        =   1
  87.       Top             =   4815
  88.       Width           =   855
  89.    End
  90.    Begin axGridControl.axgrid axgrid1 
  91.       Height          =   4005
  92.       Left            =   420
  93.       TabIndex        =   0
  94.       Top             =   240
  95.       Width           =   6270
  96.       _ExtentX        =   11060
  97.       _ExtentY        =   7064
  98.       Redraw          =   -1  'True
  99.       ShowGrid        =   -1  'True
  100.       GridSolid       =   -1  'True
  101.       GridLineColor   =   12632256
  102.       BorderStyle     =   5
  103.       AllowSelection  =   0   'False
  104.       BackColorFixed  =   12632256
  105.       ForeColorFixed  =   -2147483635
  106.       BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
  107.          Name            =   "MS Sans Serif"
  108.          Size            =   8.25
  109.          Charset         =   0
  110.          Weight          =   400
  111.          Underline       =   0   'False
  112.          Italic          =   0   'False
  113.          Strikethrough   =   0   'False
  114.       EndProperty
  115.       BeginProperty FontFixed {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
  116.          Name            =   "MS Sans Serif"
  117.          Size            =   8.25
  118.          Charset         =   0
  119.          Weight          =   400
  120.          Underline       =   0   'False
  121.          Italic          =   0   'False
  122.          Strikethrough   =   0   'False
  123.       EndProperty
  124.    End
  125.    Begin VB.Label Label2 
  126.       Caption         =   "Enter text in cell 2,2 and press this first \/"
  127.       Height          =   810
  128.       Left            =   2115
  129.       TabIndex        =   9
  130.       Top             =   4425
  131.       Width           =   1065
  132.    End
  133.    Begin VB.Label Label1 
  134.       Caption         =   "Try pressing the right mouse button too"
  135.       Height          =   240
  136.       Left            =   3315
  137.       TabIndex        =   2
  138.       Top             =   4335
  139.       Width           =   3360
  140.    End
  141. Attribute VB_Name = "Form1"
  142. Attribute VB_GlobalNameSpace = False
  143. Attribute VB_Creatable = False
  144. Attribute VB_PredeclaredId = True
  145. Attribute VB_Exposed = False
  146. Private Sub axgrid1_BtnClick(Col As Integer)
  147. MsgBox Col
  148. axgrid1.TextMatrix(axgrid1.Row, Col) = "update"
  149. axgrid1.Refresh
  150. End Sub
  151. Private Sub axgrid1_MouseDown(button As Integer, Shift As Integer, x As Single, y As Single)
  152.   If button = 2 Then MsgBox "right mouse  " + Str(axgrid1.Row) + "," + Str(axgrid1.Col)
  153. End Sub
  154. Private Sub Command1_Click()
  155.   axgrid1.Remove axgrid1.Row
  156. End Sub
  157. Private Sub Command2_Click()
  158.   axgrid1.Rows = axgrid1.Rows + 1
  159. End Sub
  160. Private Sub Command3_Click(Index As Integer)
  161.   Select Case Index
  162.   Case 0
  163.     If axgrid1.CellFontName(2, 2) = "Arial" Then
  164.       axgrid1.CellBackColor(2, 2) = vbWhite
  165.       axgrid1.CellForeColor(2, 2) = vbBlack
  166.       axgrid1.CellFontName(2, 2) = ""
  167.     Else
  168.     axgrid1.CellBackColor(2, 2) = vbRed
  169.     axgrid1.CellForeColor(2, 2) = vbBlack
  170.     axgrid1.CellFontBold(2, 2) = True
  171.     axgrid1.CellFontName(2, 2) = "Arial"
  172.     End If
  173.   Case 1
  174.     axgrid1.CellFontItalic(2, 2) = True
  175.   Case 2
  176.     axgrid1.CellFontUnderline(2, 2) = True
  177.   Case 3
  178.     axgrid1.CellFontStrikeThru(2, 2) = True
  179.   Case 4
  180.     axgrid1.CellFontSize(2, 2) = 12
  181.   End Select
  182. End Sub
  183. Private Sub Command4_Click()
  184.   axgrid1.Clear
  185. End Sub
  186. Private Sub Command5_Click()
  187.   axgrid1.TextMatrix(1, 1) = "TEST"
  188.   Row = 1: Col = 4
  189.   axgrid1.TextMatrix(Row, Col) = "UPDATE"
  190.   axgrid1.Refresh
  191. End Sub
  192. Private Sub Form_Load()
  193.   axgrid1.AutoSetup 2, 7, False, True, "Col1          |List               |No Edit          |Upper          |Numeric          |Date      |Checkmark"
  194.   axgrid1.AddLookup 2, "Text1", 1
  195.   axgrid1.AddLookup 2, "Text2", 2
  196.   axgrid1.AddLookup 2, "Text3", 3
  197.   axgrid1.AddLookup 2, "Text4", 4
  198.   axgrid1.AddButton 3
  199.   axgrid1.ColAllowEdit(3) = False
  200.   axgrid1.ColMask(4) = 1   'uppercase
  201.   axgrid1.ColMask(5) = 2    'numeric
  202.   axgrid1.ColAlign(5) = 2    'right aligned
  203.   axgrid1.ColMask(6) = 3    'date
  204.   axgrid1.ColMask(7) = 4    'checkmark
  205. End Sub
  206.