Using arcobjects I am attempting to connect a windows form with a checkedlistbox, to the layers that I have on my map in ArcGIS. When I first create my form, the list of checkboxes will automatically populate itself with the name of all the layers, and the checkbox next to the layer will be checked if the layer is set to be visible in the arcmap, and unchecked if it is not.
I want to make my form so that if the user checks/unchecks a box in the form, the corresponding layer will check/uncheck on my arcmap (and vice versa). I am having trouble getting the value (checked or unchecked) of a layer from the checkedlistbox once I try to change it on the form, and I also don't know how to update the windows form once I do so. If I use form.show(), it comes up with an entirely new map, and I would have to repopulate the checkbox and do other things. I wanted a way to simply update the values on the existing form that I had. Someone suggested using form.update(), but that isn't doing what I want it to.
أكثر...
I want to make my form so that if the user checks/unchecks a box in the form, the corresponding layer will check/uncheck on my arcmap (and vice versa). I am having trouble getting the value (checked or unchecked) of a layer from the checkedlistbox once I try to change it on the form, and I also don't know how to update the windows form once I do so. If I use form.show(), it comes up with an entirely new map, and I would have to repopulate the checkbox and do other things. I wanted a way to simply update the values on the existing form that I had. Someone suggested using form.update(), but that isn't doing what I want it to.
أكثر...