B4J Question Combo box weird behavior

le_toubib

Active Member
Licensed User
Longtime User
Hi all
I'm using jdk1.8.0_121
I fill a combo box list items with some labels...
The problem is when I select a label ... it appears normally as a new value ... but it disappears from the list of items ... and it's weird because just by scrolling the CB it reappears again ...
This problem also happened back in jdk1.8.0_74
I've had strange problems with drop down lists before that disappeared with updating jdk
So is this actually a weird behavior ? Or I'm I missing something ?
20170209_064019cb.jpg
 

le_toubib

Active Member
Licensed User
Longtime User
B4X:
Sub FillAllFHL(tlist As List, init As Boolean)
    Dim lblForHowLong(20,30) As Label
    For i = 0 To 19 '20combos
        If init = True Then SPNforhowlong(i).Initialize("SPNforhowlong")
        SPNforhowlong(i).Items.clear
        SPNforhowlong(i).Tag=i
        If i=0 Then
            If init=True Then SPNPresc.Initialize("SPNPresc") Else SPNPresc.Items.Clear
        End If
        For ii = 0 To  tlist.Size-1
            Dim tempstring As String = tlist.Get(ii)
            lblForHowLong(i,ii).Initialize("lblForHowLong")
            lblForHowLong(i,ii).Tag=ii
            lblForHowLong(i,ii).Text=tempstring
            lblForHowLong(i,ii).Style=" -fx-font-size: " & Fonts & "; -fx-font-weight: bold"
            SPNforhowlong(i).Items.Add(lblForHowLong(i,ii))
            If i=0 Then
                SPNPresc.Items.Add(lblForHowLong(i,ii))
            End If
        Next
    Next
End Sub


this is the code .. contents are fixed but the styling changes dynamically .
P.S : the items only disappear and show back upon scrolling ... there is no events on the Spinner
 
Upvote 0
Top