Hi All, hope you are all having a nice day...
I am having an issue adding a combo to a panel on the fly, it gives an error 22 as below, and I can't work out what I am doing wrong. I can't seem to find a general reference to how things should be formatted. I realise that I am moving the object, I tried to fudge by adding in the designer and moving into position, but don't like that method.
It is showing the error as below
I am having an issue adding a combo to a panel on the fly, it gives an error 22 as below, and I can't work out what I am doing wrong. I can't seem to find a general reference to how things should be formatted. I realise that I am moving the object, I tried to fudge by adding in the designer and moving into position, but don't like that method.
B4X:
'Task Combo
Dim query As String ="Select tsk_description from tasklist order by tsk_description"
Dim lst As List
lst.Initialize
Dim rs As ResultSet
rs = Starter.SQLstat.ExecQuery(query)
lst.Add("Not Selected")
lst.Add("Other")
Do While rs.NextRow
lst.Add(rs.Getstring("tsk_description"))
Loop
spnTask.Initialize(Me,"spnTask")
spnTask.SetItems(lst)
pnl.AddView(spnTask, 17%x, lngYPos, 45%x, 40dip)
spnTask.mBase.Left = 100dip
spnTask.mBase.top = lngYPos
spnTask.mBase.Width=300dip
spnTask.mBase.Height = 40dip
spnTask.mBase.Visible = True
It is showing the error as below