I have a Dialog Box (a form with a layout region on it) which has on it a listbox. This listbox is populated in LotusScript using an array of strings and the AppendItemValue method of NotesItem, code looks like this:
If events.count=0 Then 'Only carry on if there are some event docs to process!
Messagebox "No events found for this person", 0+48, "No events"
Else
'Create the dummy document
Set listdoc = currentdb.CreateDocument
For x = 1 To events.count
'Redimension dynamic array to allow for new entry to be added
Redim Preserve listentries(x)
'Add the required details to the string. Prefix each entry with a number for indexing
Set evtDoc = events.GetNthDocument(x)
listentries(x-1) = Str(x) + ". " + evtdoc.evtOrder(0) + " (commencing on " + Str(evtDoc.evtSentDate(0)) + ")"
Next
'set up the notesitem to represent the list of events
Set listitem = listdoc.AppendItemValue("lstEvents", listentries)
flag = ws.DialogBox( "dlgEventList" , True , True , False , False , False , False , "Events" , listdoc)
Messagebox "need this here to inspect variables",0,""
End If
This creates an array of strings, each prefixed with a value (x) which is increased for each entry.
My problem is, I can’t figure out how to get at the item in the list that the user has selected. The list renders fine, but I can’t find the value selected.
The really weird bit is that it works fine if I use Radio buttons, but will not work for either a listbox or a combobox. I really don’t want to use radio buttons in case the list is longer than the layout allows for…
Anyone any ideas?
Simon