I have really tried to find an answer to this question in the forum but it has eluded me. If there is a posting that explains this, just point me to it...
This is my first app using preferencesdialog, here is a screenshot.
Ultimately, I need to fill the top item (short options) with information from a database, but to make it simple, I just want to fill it programmatically. The item1 text is an Item I put into the FormsBuilder, so my app wouldn't ABEND
Not sure it will help much but here is the section where this dialog is opened and the results processed:
How to I access the short options item and fill it? I hope I've provided enough information...
This is my first app using preferencesdialog, here is a screenshot.
Ultimately, I need to fill the top item (short options) with information from a database, but to make it simple, I just want to fill it programmatically. The item1 text is an Item I put into the FormsBuilder, so my app wouldn't ABEND
Not sure it will help much but here is the section where this dialog is opened and the results processed:
B4X:
Private Sub addrecbtn_Click
Dim timeinstr As String
Dim timeoutstr As String
Dim tottimestr As String
Dim costcenterstr As String
Dim summarystr As String
'<<--- Fill Options combo here --->>
Dim thetime As String
Wait For (timedialog.ShowDialog(Options1, "Ok", "Cancel")) Complete (Result As Int)
If Result = xui.DialogResponse_Positive Then
Dim intime As Period = Options1.Get("timein")
thetime=NumberFormat(intime.Hours,2,0)&":"&NumberFormat(intime.Minutes,2,0)
timeinstr=utils.ConvertTo12HrTime(thetime,True)
Dim outtime As Period = Options1.Get("timeout")
thetime=NumberFormat(outtime.Hours,2,0)&":"&NumberFormat(outtime.Minutes,2,0)
timeoutstr=utils.ConvertTo12HrTime(thetime,True)
Dim timediff As Period
DateTime.TimeFormat="hh:mm a"
timediff= DateUtils.PeriodBetween( DateTime.TimeParse( timeinstr),DateTime.TimeParse(timeoutstr))
tottimestr=NumberFormat(timediff.Hours,2,0)&":"&NumberFormat(timediff.Minutes,2,0)
costcenterstr=Options1.Get("costcenter")
summarystr=Options1.Get("summary")
addrawdataitem(timeinstr,timeoutstr,tottimestr,costcenterstr,summarystr)
End If
End Sub
How to I access the short options item and fill it? I hope I've provided enough information...
Last edited: