HiI can't figure how to write the output after pressing a button to a form within my project, can anyone help with this?I tought it ould be as simple as either addressing the dockable window (DocWindow) and then the listbox (lstResults) control but I just can't get it to work.Any help appreciated.Stephen
Good luck!
Thanks for the help I didn't have the list control set to public so I changed this but I am still getting a null reference when I try to address it. My code was quite similar to yours (VB.NET) and I now have: Protected Overrides Sub OnClick() Dim m As imap Dim e As IEnumLayer m = My.ArcMap.Document.FocusMap e = m.Layers(Nothing, True) e.Reset() Dim layer As ILayer layer = e.Next Dim dockWindow As ESRI.ArcGIS.Framework.IDockableWindow Dim dockWinID As UID = New UIDClass() dockWinID.Value = My.ThisAddIn.IDs.pradDocWin dockwindow = My.ArcMap.DockableWindowManager.GetDockableWindow(dockWinID) While Not (layer Is Nothing) dockWindow.docwinlistbox.items.add(layer.Name) layer = e.Next End While dockWindow.Show(True) End Sub The red section holds the problem line with docwinlistbox coming out as a null - the list box is called this on the form - name property and as I mentioned before the Modifiers=Public now.. Thanks Stephen
Přihlášení členové mohou přispívat, sledovat aktualizace a další. Jste tu noví? Zaregistrujte si bezplatný účet.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.