Beginner
Date of registration: Jan 15th 2011
Location: Sarasota, FL
Occupation: Cabinet Design
Hobbies: Programming
Jabaco Source |
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 |
Option Explicit Public Sub Form_Load() GridTest() End Sub Public Sub GridTest() 'JBGrid1.Header = False JBGrid1.Cols = 4 JBGrid1.Rows = 40 JBGrid1.Editable = jbEditOnDblClick JBGrid1.Parent.getTableHeader.setCursor(VBMousePointerToJCursor(vbHandCursor)) JBGrid1.ColHeaderIndex = 2 Dim x As Integer, y As Integer For y = 0 To JBGrid1.Cols JBGrid1.Header(y) = "Header" & y For x = 0 To JBGrid1.Rows JBGrid1.DataMatrix(x, y) = "D_Item_" & x & "/" & y JBGrid1.DataMatrix(x, y).TextAlign = fmTextAlignRight Next Next End Sub Public Sub JBGrid1_BeforeCellEdit(row As Integer, col As Integer) Select Case col Case 0 JBGrid1.ComboList = "..." 'invokes CellButton Case 1 JBGrid1.ComboList = "Test1|Test2" 'invokes ComboList, use '|' as item seperator Case Else JBGrid1.ComboList = "" 'reset to DefaultEditor End Select End Sub Public Sub JBGrid1_CellButtonClick() Me.Caption = "HitTest: CellButtonClick " & JBGrid1.Row & "/" & JBGrid1.Col End Sub Public Sub JBGrid1_AfterCellEdit(row As Integer, col As Integer) Me.Caption = "HitTest: AfterCellEdit " & row & "/" & col End Sub Public Sub JBGrid1_Click() Me.Caption = "HitTest: Click " & JBGrid1.Row & "/" & JBGrid1.Col End Sub Public Sub JBGrid1_DblClick() Me.Caption = "HitTest: DblClick " & JBGrid1.Row & "/" & JBGrid1.Col End Sub Public Sub JBGrid1_ColHeaderClick() Me.Caption = "HitTest: ColHeaderClick " & JBGrid1.ColHeaderIndex End Sub |
Beginner
Date of registration: Jan 15th 2011
Location: Sarasota, FL
Occupation: Cabinet Design
Hobbies: Programming
This post has been edited 1 times, last edit by "Perry" (Jul 18th 2013, 7:03pm)
Jabaco Source |
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 |
Dim Ret As Single Ret = Int(5 / 7) Debug.Print Ret ' JB 1.0 VB 0 Ret = Fix(5 / 7) Debug.Print Ret ' JB 0.0 VB 0 Dim Ret1 As Integer Ret1 = 5 / 7 Debug.Print Ret1 ' JB 0 VB 1 Dim MyNumber As Integer MyNumber = Int(99.8) ' JB 100 VB 99 Debug.Print MyNumber MyNumber = Fix(99.8) ' JB 99 VB 99 Debug.Print MyNumber MyNumber = Int(-99.8) ' JB -100 VB -100 Debug.Print MyNumber MyNumber = Fix(-99.8) ' JB -99 VB -99 Debug.Print MyNumber MyNumber = Int(-99.2) ' JB -99 VB -100 Debug.Print MyNumber MyNumber = Fix(-99.2) ' JB -99 VB -99 Debug.Print MyNumber |
Beginner
Date of registration: Jan 15th 2011
Location: Sarasota, FL
Occupation: Cabinet Design
Hobbies: Programming