Click here to Skip to main content
15,914,010 members

Comments by sunitkrishna (Top 1 by date)

sunitkrishna 28-Oct-10 5:55am View    
Here is what i do to place the buttons dynamically.
using (DataSet ds = new LayoutDAL().GetLayoutDetails(_layoutId))
{
Button bt = new Button();
bt.SetBounds(Convert.ToInt32(ds.Tables[0].Rows[i]["LocationX"]), Convert.ToInt32(ds.Tables[0].Rows[i]["LocationY"]), 60,60);
}

I have set 60x60 as the size of the button.The sizemode property set to 'StretchImage'by design.