Dear visitor, welcome to Jabaco - Community. If this is your first visit here, please read the Help. It explains in detail how this page works. To use all features of this page, you should consider registering. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.
Jabaco Source |
|
1 2 3 4 5 6 |
JBGrid1.Editable = jbEditOnClick ' Dim ComboBox1 As javax#swing#JComboBox = New javax#swing#JComboBox ComboBox1.AddItem("Yes") ComboBox1.AddItem("No") 'AFTER!!!!!! DataMatrix or TextMatrix of JBGrid1 is addressed set your new CellEditor JBGrid1.Parent.getColumnModel().getColumn(2).setCellEditor(New DEFAULTCellEditor(ComboBox1)) |
Jabaco Source |
|
1 2 3 4 5 6 7 8 9 10 11 12 13 |
'draw a JBGrid1 'draw a ComboBox1 Public Sub Form_Load() JBGrid1.Editable = jbEditOnClick ' JBGrid1.SelectionMode = flexSelectionByRow ' Dim ComboBox1 As javax#swing#JComboBox = New javax#swing#JComboBox ComboBox1.AddItem("Yes") ComboBox1.AddItem("No") JBGrid1.TextMatrix(0,2) = "" 'AFTER!!!!!! DataMatrix or TextMatrix of JBGrid1 is addressed set your new CellEditor JBGrid1.Parent.getColumnModel().getColumn(2).setCellEditor(New DEFAULTCellEditor(ComboBox1)) End Sub |
Jabaco Source |
|
1 2 3 4 5 6 7 8 9 10 11 12 |
'draw a JBGrid1 Public Sub Form_Load() JBGrid1.Editable = jbEditOnClick ' JBGrid1.SelectionMode = flexSelectionByRow Dim ComboBox1 As javax#swing#JComboBox = New javax#swing#JComboBox ComboBox1.AddItem("Yes") ComboBox1.AddItem("No") JBGrid1.TextMatrix(0,2) = "" 'AFTER!!!!!! DataMatrix or TextMatrix of JBGrid1 is addressed set your new CellEditor JBGrid1.Parent.getColumnModel().getColumn(2).setCellEditor(New javax#swing#DefaultCellEditor(ComboBox1)) End Sub |
This post has been edited 1 times, last edit by "fomaxrge" (Oct 31st 2012, 12:11pm)
Jabaco Source |
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
'draw a JBGrid1 'draw a ComboBox1 Public Sub Form_Load() JBGrid1.Editable = jbEditOnClick JBGrid1.TextMatrix(0,2) = "test" 'AFTER!!!!!! DataMatrix or TextMatrix of JBGrid1 is addressed set your new CellEditor JBGrid1.Parent.getColumnModel().getColumn(2).setCellEditor(New javax#swing#DefaultCellEditor(ComboBox1)) ComboBox1.AddItem("Yes") ComboBox1.AddItem("No") End Sub Public Sub ComboBox1_Click() ComboBox1.Parent.setSelectedIndex(-1) End Sub |
Jabaco Source |
|
1 2 3 |
Public Sub ComboBox1_Change() MsgBox("your selection is " + ComboBox1) End Sub |
Jabaco Source |
|
1 2 |
'If you know how many Items are to be loaded If Combobox1.ListCount < 3 then Exit Sub |
Jabaco Source |
|
1 2 3 4 |
Public Sub ComboBox1_Change() If Combobox1.ListCount < 3 then Exit Sub MsgBox("your selection is " + ComboBox1) End Sub |
Quoted
'AFTER!!!!!! DataMatrix or TextMatrix of JBGrid1 is addressed set your new CellEditor
Quoted
Do While Data.next()
MsgBox JBGrid1.Parent.getColumnModel().getColumn(4).setCellEditor(New javax#swing#DefaultCellEditor(ComboBox3))
...
Jabaco Source |
|
1 |
MsgBox(JBGrid1.TextMatrix(JBGrid1.Row, 4))
|