Click here to Skip to main content
15,849,615 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hi friends

How to create and arrange button in circular position programmatically.

please follow the link to see what i want actually.[^]

[edit]"Treat my content as plain text..." option disabled to make link work- OriginalGriff[/edit]
Updated 16-Dec-11 4:41am

1 solution

Create button programably:
Button b = new Button();
b.Text = "Hello";
b.Click += new EventHandler(button_Click);
b.Location = new Point(x, y);

To work out the (x, y) coordinates, use the normal circle algorithm:
Y = R * Sin(A)
X = R * Cos(A)
   where R is the radius, 
         A is the angle in degrees
Share this answer
AmitGajjar 16-Dec-11 10:38am    
good one, didn't try but 5+ for idea...

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900