You are not logged in.

Dani

Intermediate

  • "Dani" started this thread

Posts: 325

Date of registration: Nov 19th 2009

Location: GERMANY

  • Send private message

1

Friday, January 24th 2014, 3:10pm

Framework Update - ComboBox / ListBox .AddItem Speed improvement and new features

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...

theuserbl

Intermediate

Posts: 436

Date of registration: Dec 20th 2008

  • Send private message

2

Saturday, January 25th 2014, 2:01am

RE: Framework Update - ComboBox / ListBox .AddItem Speed improvement and new features

for testing:

Very nice. :thumbup:

Quoted

Jabaco Source

1
2
3
Public Sub Command1_Click()
   Call ComboBox.DropDown()
End Sub

You have forgotten the "1". This will work correct. :) :

Jabaco Source

1
2
3
Public Sub Command1_Click()
   Call ComboBox1.DropDown()
End Sub


Quoted

I am pretty sure theuserbl will provide a compiled Jabaco.jar as soon as he has got the time to do so!

Done.
But as I have mentioned at
[ http://www.jabaco.org/board/p3735-listbo…x.html#post3735 ]
it is no longer possible to me, to upload binary files on Google Code. (Only in a SVN it would be possible, but thats not the sense of it).
Google sees Google Drive as follower of it.
But as you can see, it is not possible to download it there direct, by posting a direct link.
So I am still searching for a new place for hosting the binary files....

Greatings
theuserbl

theuserbl

Intermediate

Posts: 436

Date of registration: Dec 20th 2008

  • Send private message

3

Saturday, January 25th 2014, 2:29am

RE: RE: Framework Update - ComboBox / ListBox .AddItem Speed improvement and new features

Google sees Google Drive as follower of it.
But as you can see, it is not possible to download it there direct, by posting a direct link.
So I am still searching for a new place for hosting the binary files....

Done. Have found a new home for the binaries at Bitbucked.
At
[ http://www.jabaco.org/wiki/Latest_JabacoFramework_Binary ]
it links direct to it.
Before that it looks like
[ http://www.jabaco.org/w/index.php?title=…inary&oldid=372 ]

Greatings
theuserbl

Dani

Intermediate

  • "Dani" started this thread

Posts: 325

Date of registration: Nov 19th 2009

Location: GERMANY

  • Send private message

4

Saturday, January 25th 2014, 9:42am

cool 8) as always...

thanks,


Dani

Rate this thread
WoltLab Burning Board