iOS Question b4xCombo not working

David Elkington

Active Member
Licensed User
Longtime User
I have a few combo boxes on a b4i form that is made up of a layout with a scrollview and embedded is a layout with my views on. I have tried to set the items in the combo box using the same methods I have used elsewhere, but the combo box is staying blank, any help would be appreciated...

B4X:
Dim Query As String
    Dim lstContract As List
    Dim lstWAH As List
    lstContract.Initialize
    lstContract.Add("Select Contract")
    lstContract.Add("No Contract")
    
    If Main.lngSubContractID <>0 Then
        Query="Select contract.con_name from Contract INNER JOIN SubcontractorContract on Contract.con_id=subcontractorcontract.dsc_contract where (((SubcontractorContract.dsc_subcontractor)=" & Main.lngSubContractID & ")) order by contract.con_name"
    Else
        Query="Select con_name from Contract order by con_name"
    End If
    
    
    Dim rsContract As ResultSet = Starter.SQLStat.ExecQuery(Query)
    Do While rsContract.NextRow
        lstContract.Add(rsContract.Getstring("con_name"))
    Loop
    cmbContract.SetItems(lstContract)
    cmbContract.SelectedIndex = 0
    
    lstWAH.Initialize
    lstWAH.Add("Select Contract")
    lstWAH.Add("No Contract")
    cmbWAH.SetItems(lstWAH)
 

David Elkington

Active Member
Licensed User
Longtime User
Ah, I have solved the issue, I was trying to set the contents of the views on the panel when it had not run the page resize event, was a question of order.
 
Upvote 0
Top