Hi,

I have a TableLayout...

I want to add a tableRow containing buttons...

I do this to achieve my goal:

TableRow rowa = new TableRow(this);
            rowa.LayoutParameters = new
ViewGroup.LayoutParams(Android.Widget.TableRow.LayoutParams.FillParent,
Android.Widget.TableRow.LayoutParams.FillParent);

            rowa.SetMinimumHeight(80);
            rowa.SetMinimumWidth(200);

            rowa.SetBackgroundColor(Android.Graphics.Color.LightBlue);
            for (int i = 0; i < 6; i++)
            {
                Button but = new Button(this);
                but.Text = "Nicolas";
                but.SetBackgroundColor(Android.Graphics.Color.Red);
                but.SetWidth(100);
                but.SetHeight(80);
                but.LayoutParameters = new
ViewGroup.LayoutParams(ViewGroup.LayoutParams.MatchParent,
ViewGroup.LayoutParams.WrapContent);                
                rowa.AddView(but);
                but.Click += new EventHandler(but_Click);
            }

            layout.AddView(rowa,1);

The TableRow (in lightblue) is added but not the buttons.

What Am i missing in order to reach my goal ? 

Thanks




--
View this message in context: 
http://mono-for-android.1047100.n5.nabble.com/Add-row-to-a-table-row-tp5711782.html
Sent from the Mono for Android mailing list archive at Nabble.com.
_______________________________________________
Monodroid mailing list
Monodroid@lists.ximian.com

UNSUBSCRIBE INFORMATION:
http://lists.ximian.com/mailman/listinfo/monodroid

Reply via email to