B4A Library [B4X] [XUI] B4XComboBox - Cross platform ComboBox / Spinner

Discussion in 'Additional libraries, classes and official updates' started by Erel, Feb 18, 2018.

  1. Erel

    Erel Administrator Staff Member Licensed User

    [​IMG]

    B4XComboBox class is a wrapper for B4J ComboBox, B4A Spinner and B4i Button + ActionSheet.
    It is implemented as a custom view and should be added with the designer.

    Depends on XUI library.
     

    Attached Files:

    stanks, koaunglay, MarkusR and 29 others like this.
  2. JonPM

    JonPM Well-Known Member Licensed User

    In B4A designer I tried changing text color but it still shows black in the app. Bug?
     
  3. Erel

    Erel Administrator Staff Member Licensed User

    Add this line to DesignerCreateView (in the B4A section):
    Code:
    cmbBox.TextColor = xlbl.TextColor
     
    JonPM likes this.
  4. Antonio D'Angeli

    Antonio D'Angeli Member Licensed User

    exist example with B4xComboBox?
    Thank
     
  5. Wolli013

    Wolli013 Active Member Licensed User

    And for me!
    Thank You
     
  6. Erel

    Erel Administrator Staff Member Licensed User

    Yes:
     
    mendiburen likes this.
  7. peacemaker

    peacemaker Well-Known Member Licensed User

    Code:
    Public Sub IndexOf(value As StringAs Int
        
    #if B4J
            For i = 0 To cmbBox.Items.Size - 1
                Dim item As String = cmbBox.Items.Get(i)
                If item = value Then Return i
            Next
        #Else If B4A
            Return cmbBox.IndexOf(value)
        #Else
            For i = 0 To mItems.Size - 1
                Dim item As String = mItems.Get(i)
                If item = value Then Return i
            Next
        
    #End If
        
    Return -1    'ignore
    End Sub
     
    Last edited: Oct 4, 2018
    Erel likes this.
  8. Erel

    Erel Administrator Staff Member Licensed User

    Code:
    Return -1
    End Sub
     
    peacemaker likes this.
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice