Hi Scott,
This should do what you want. Compile this simple example to get the idea?
Hope this helps
Cheers
James
Include "Mapbasic.def"
Declare Sub Main
Declare Sub AddItemDialog
Declare Sub AlterMainDialog
Dim gsaListItems() as String
'---------------------------------------------------------------------------
Sub Main
Dialog Title "Main Dialog"
Control StaticText Title "List"
Control PopupMenu ID 1 Title from variable gsaListItems Width 100
Control Button Title "Add Item" ID 2 Calling AddItemDialog
Control OkButton
Control CancelButton
End Sub
'---------------------------------------------------------------------------
Sub AddItemDialog
Dim strAddItem as String
Dialog Title "Add Item Dialog"
Control EditText Width 100 Into strAddItem
Control OkButton Title "Add" Control
CancelButton
If CommandInfo(CMD_INFO_DLG_OK) Then
Dim i as Integer
i = Ubound(gsaListItems)
Redim gsaListItems( i + 1)
i = Ubound(gsaListItems)
gsaListItems(i) = strAddItem
Call AlterMainDialog
End If
End Sub
'---------------------------------------------------------------------------
Sub AlterMainDialog
Alter Control 1 Title from variable gsaListItems
End Sub
'---------------------------------------------------------------------------