home *** CD-ROM | disk | FTP | other *** search
- VERSION 5.00
- Object = "{32A4927E-FB95-11D1-BF5B-00A024982E5B}#88.0#0"; "axGrid.ocx"
- Begin VB.Form Form1
- Caption = "Form1"
- ClientHeight = 5850
- ClientLeft = 60
- ClientTop = 345
- ClientWidth = 7065
- LinkTopic = "Form1"
- ScaleHeight = 5850
- ScaleWidth = 7065
- StartUpPosition = 3 'Windows Default
- Begin VB.CommandButton Command5
- Caption = "Change"
- Height = 375
- Left = 1020
- TabIndex = 11
- Top = 4380
- Width = 855
- End
- Begin VB.CommandButton Command4
- Caption = "Clear"
- Height = 375
- Left = 120
- TabIndex = 10
- Top = 5250
- Width = 855
- End
- Begin VB.CommandButton Command3
- Caption = "Size 12"
- Height = 315
- Index = 4
- Left = 6150
- TabIndex = 8
- Top = 5235
- Width = 840
- End
- Begin VB.CommandButton Command3
- Caption = "StrikeThru"
- Height = 315
- Index = 3
- Left = 5055
- TabIndex = 7
- Top = 5250
- Width = 1035
- End
- Begin VB.CommandButton Command3
- Caption = "Underline"
- Height = 315
- Index = 2
- Left = 4140
- TabIndex = 6
- Top = 5250
- Width = 840
- End
- Begin VB.CommandButton Command3
- Caption = "Italic"
- Height = 315
- Index = 1
- Left = 3240
- TabIndex = 5
- Top = 5250
- Width = 840
- End
- Begin VB.CommandButton Command3
- Caption = "Font, Color, Bold"
- Height = 465
- Index = 0
- Left = 2145
- TabIndex = 4
- Top = 5250
- Width = 1065
- End
- Begin VB.CommandButton Command2
- Caption = "Add"
- Height = 375
- Left = 135
- TabIndex = 3
- Top = 4395
- Width = 855
- End
- Begin VB.CommandButton Command1
- Caption = "Delete"
- Height = 375
- Left = 135
- TabIndex = 1
- Top = 4815
- Width = 855
- End
- Begin axGridControl.axgrid axgrid1
- Height = 4005
- Left = 420
- TabIndex = 0
- Top = 240
- Width = 6270
- _ExtentX = 11060
- _ExtentY = 7064
- Redraw = -1 'True
- ShowGrid = -1 'True
- GridSolid = -1 'True
- GridLineColor = 12632256
- BorderStyle = 5
- AllowSelection = 0 'False
- BackColorFixed = 12632256
- ForeColorFixed = -2147483635
- BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
- Name = "MS Sans Serif"
- Size = 8.25
- Charset = 0
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- BeginProperty FontFixed {0BE35203-8F91-11CE-9DE3-00AA004BB851}
- Name = "MS Sans Serif"
- Size = 8.25
- Charset = 0
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- End
- Begin VB.Label Label2
- Caption = "Enter text in cell 2,2 and press this first \/"
- Height = 810
- Left = 2115
- TabIndex = 9
- Top = 4425
- Width = 1065
- End
- Begin VB.Label Label1
- Caption = "Try pressing the right mouse button too"
- Height = 240
- Left = 3315
- TabIndex = 2
- Top = 4335
- Width = 3360
- End
- Attribute VB_Name = "Form1"
- Attribute VB_GlobalNameSpace = False
- Attribute VB_Creatable = False
- Attribute VB_PredeclaredId = True
- Attribute VB_Exposed = False
- Private Sub axgrid1_BtnClick(Col As Integer)
- MsgBox Col
- axgrid1.TextMatrix(axgrid1.Row, Col) = "update"
- axgrid1.Refresh
- End Sub
- Private Sub axgrid1_MouseDown(button As Integer, Shift As Integer, x As Single, y As Single)
- If button = 2 Then MsgBox "right mouse " + Str(axgrid1.Row) + "," + Str(axgrid1.Col)
- End Sub
- Private Sub Command1_Click()
- axgrid1.Remove axgrid1.Row
- End Sub
- Private Sub Command2_Click()
- axgrid1.Rows = axgrid1.Rows + 1
- End Sub
- Private Sub Command3_Click(Index As Integer)
- Select Case Index
- Case 0
- If axgrid1.CellFontName(2, 2) = "Arial" Then
- axgrid1.CellBackColor(2, 2) = vbWhite
- axgrid1.CellForeColor(2, 2) = vbBlack
- axgrid1.CellFontName(2, 2) = ""
- Else
- axgrid1.CellBackColor(2, 2) = vbRed
- axgrid1.CellForeColor(2, 2) = vbBlack
- axgrid1.CellFontBold(2, 2) = True
- axgrid1.CellFontName(2, 2) = "Arial"
- End If
- Case 1
- axgrid1.CellFontItalic(2, 2) = True
- Case 2
- axgrid1.CellFontUnderline(2, 2) = True
- Case 3
- axgrid1.CellFontStrikeThru(2, 2) = True
- Case 4
- axgrid1.CellFontSize(2, 2) = 12
- End Select
- End Sub
- Private Sub Command4_Click()
- axgrid1.Clear
- End Sub
- Private Sub Command5_Click()
- axgrid1.TextMatrix(1, 1) = "TEST"
- Row = 1: Col = 4
- axgrid1.TextMatrix(Row, Col) = "UPDATE"
- axgrid1.Refresh
- End Sub
- Private Sub Form_Load()
- axgrid1.AutoSetup 2, 7, False, True, "Col1 |List |No Edit |Upper |Numeric |Date |Checkmark"
- axgrid1.AddLookup 2, "Text1", 1
- axgrid1.AddLookup 2, "Text2", 2
- axgrid1.AddLookup 2, "Text3", 3
- axgrid1.AddLookup 2, "Text4", 4
- axgrid1.AddButton 3
- axgrid1.ColAllowEdit(3) = False
- axgrid1.ColMask(4) = 1 'uppercase
- axgrid1.ColMask(5) = 2 'numeric
- axgrid1.ColAlign(5) = 2 'right aligned
- axgrid1.ColMask(6) = 3 'date
- axgrid1.ColMask(7) = 4 'checkmark
- End Sub
-