Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

I'd like to develop an app so that user introduce the layers in comboboxes ( layers are slope,aspect,elevation etc) then user use these layers for processing in another form(processing form) and dose not need to select the items in processing form . i don't know how can i write the code for saving the layers in comboboxes . please recommend a solution for this app.

thnx.

share|improve this question

1 Answer 1

On your comobo box SelectedIndexChanged event just assign your cbo text to a public shared variable:

g_strXYZ == this.cboXYZ.Text

You can then assign this varable to your other form control on the Load event.

this.cboOther.Items.Add(g_strXYZ)
share|improve this answer
    
and about save button ? how can i write code for button "ok" to save my layers in comboboxes? –  wetland Feb 22 '12 at 15:24
    
i found it . i have to use xml to save layer and use it to pass to the another combobox . –  wetland Feb 24 '12 at 18:28

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.