Question: I want to add an item to my combobox in form1 from form2. But if I press the button, form2 closes but the item is not added in form1. I hope you can help me! I found no solution for this problem in the internet.

Form 2:

```
public void button5_Click(object sender, EventArgs e)
{
    Form1 main = new Form1();

    main.AddItem("Item");
    this.Close();
}

```

Form 1:

```
public void AddItem(object item)
{
    comboBox1.Items.Add(item);
}

```

Answer: 
--Edit: sorry, I didn't notice you wanted a Spinner in there as well. I'm leaving my post up for the #getView() part, should it be of any use. --

First of make a separate .xml file containing the layout properties of each ListView item in your res/layout folder like so:

```
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/hm"
    android:layout_width="fill_parent"
    android:layout_height="wrap_content">
<TextView
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:text="text1"
    android:id="@+id/text1" />
<TextView
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:text="text2"
    android:id="@+id/text2" />
</RelativeLayout>

```

Then you have to create a new ArrayAdapter and override #getView() as such:

```
    @Override
    public View getView(final int position, View view, final ViewGroup parent) {
        final LayoutInflater inflater = activity.getLayoutInflater();
        view = inflater.inflate(R.layout.list_single, parent, false); //R.layout.list_single is what I named above .xml layout
        TextView label = (TextView) view.findViewById(R.id.text1); //R.id.text1 is the id we gave the first TextView in the .xml layout
        TextView txt = (TextView) view.findViewById(R.id.text2); //R.id.text2 is the id we gave the second TextView in the .xml layout
        final Item details = list.get(position); //Item = object type you want to get information from, list = a List of the items that are in the ListView
        label.setText(details.name); //sets the text
        txt.setText(details.surname); //sets the text
        return view;
    }

```

Please note: this is a basic version of #getView().

Look into the [ViewHolder](http://www.vogella.com/tutorials/AndroidListView/article.html) pattern to read about a more efficient way to handle getting the views.
```
public View getView(int position, View convertView, ViewGroup parent) {
View v = convertView;
int posType = getItemViewType(position);
if (v == null) {
    LayoutInflater inflater = (LayoutInflater) ctx.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
    if (posType == 0) {

        v = inflater.inflate(R.layout.layout1, parent, false);
    }
    else {
        v = inflater.inflate(R.layout.layout2, parent, false);
    }
}
return v;

```

}