B4A Library Simple Combo box (with source)

Hi guys,

This is a very simple Custom View Combo box for B4A only. you can modify it to your need.

SS.png


Version : 1

Methods
  • AddSingle(Val As String), add single item to list
  • AddMulti(Val() As String), add multi item to list
  • AddTwoLines(Val1 As String,Val2 As String,RetVal As String), add to line to list
  • GetLv, get List View of the Combo
  • Text, set or get Text of the Combo
Event
  • Clicked, fired when you choose an item in the combo box
Sample Codes
B4X:
Sub Globals
    Private dbYear As CustomDB
End Sub

Sub Activity_Create(FirstTime As Boolean)
    For y = 2017 To 2031
        dbYear.AddSingle(y)
    Next
End Sub

Private Sub dbYear_Clicked
    Private year as String
    year = dbYear.Text
    'add you own codes'
End Sub
 

Attachments

  • Combo.zip
    11.3 KB · Views: 607
Last edited:

incendio

Well-Known Member
Licensed User
Longtime User
There's only click event.

Use this code
B4X:
Sub Globals
    Private dbYear As CustomDB
End Sub

Sub dbYear_Clicked
   'add your own coding'
End Sub
 
Top