Hey there,
I have fixed some issues with the Jabaco ComboBox and ListBox.
I made it more compatible with VB and added some functionality.
You can view my changes to the framework here (rev. 128 ):
https://code.google.com/p/jabacoframewor…ce/detail?r=128
ComboBox
Event EditorClick()
- raised on mouse click in the ComboBox 'TextBox'
Event ListClick()
- is only raised when a selection in the dropdownlist is made with the mouse
Event DropDown()
- raised on mouse or up-/down key action
Call ComboBox.DropDown()
- opens the ComboBox List
Public Property Get DropedDown() As Boolean
- determine whether ComboBox list is dropped down
Public Property Get Sorted() As Boolean
Public Property Let Sorted(v As Boolean)
- has to be set before ComboBox.AddItem or ComboBox.ComboList are called!!
- sorts the ComboBox dropdownlist in lexical order; not very fast when using more than a few thousand entries
Public Property Get Style() As jbComboBoxStyle
Public Property Let Style(v As jbComboBoxStyle)
- jbDropdownCombo (editable ComboBox)
- jbSimpleCombo (same as jbDropdownList; only here to be compatible with VB)
- jbDropdownList (non editable ComboBox)
- jbDropdownComboAutocomplete (editable ComboBox with a simple autocomplete feature as you type; this is a bit experimental, so play with it on your target system!)
Issues:
- jbDropdownCombo is now the default style to be compatible with VB; you have to change your previous projects
- Combobox.AddItem / List.AddItem = "some String" is now performing much faster; 100.000 entries and more are no problem anymore
- When using a ComboBox as an editor for the JBGrid you have to use 'JBGrid1.CellEditor.JBComboBox.Style = jbDropdownList' in the BeforeEdit() Sub, the other styles don't work with the Grid! This might be LAF related
- There is a bug in 'Windows' LAF. The textbox is a bit too short and different background colors cause a haptical issue!!To fix this I would have to override the paint method of JComboBox in order to resize the editor textbox to fit. I don't know if that is a valid operation in the Java world, but it seems like there is no obvious downside!? This would also make a 'SimpleCombo', with no downarrowbutton, known from VB possible. I have the code, but did not upload it...
for testing:
|
Jabaco Source
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
Public Sub Form_Load()
ComboBox1.Sorted = True
ComboBox1.Style = jbDropdownComboAutocomplete
ComboBox1.AddItem "Januar"
ComboBox1.AddItem "Februar"
ComboBox1.AddItem "Maerz"
ComboBox1.AddItem "April"
ComboBox1.AddItem "Mai"
ComboBox1.AddItem "Juni"
ComboBox1.AddItem "Juli"
ComboBox1.AddItem "August"
ComboBox1.AddItem "September"
ComboBox1.AddItem "Oktober"
ComboBox1.AddItem "November"
ComboBox1.AddItem "Dezember"
End Sub
Public Sub Command1_Click()
Call ComboBox.DropDown()
End Sub
|
OK, let me know if you find anything disturbing...
Dani
I am pretty sure theuserbl will provide a compiled Jabaco.jar as soon as he has got the time to do so!
You can usually find it here:
http://www.jabaco.org/wiki/Latest_JabacoFramework_Binary
@ theuserbl
Thanks for that...