Hello Guys,I hopeyou will be fine guys i have facing a logical problems that it
i want buttons like this
in m[
^]
in my form but i can't do it please help me how can i do it
Thanks
What I have tried:
Button button = sender as Button;
string buttonText = button.Text;
MessageBox.Show(buttonText);
int CatId = OperationAccess.GetId("SELECT catID from tbl_Catagary where name='" + button.Text + "'");
List buttons = new List();
List<string> All_Catagary = OperationAccess.GetName("SELECT name FROM tbl_product where catID=" + CatId + "");
int repetition = 0;
for (int i = 0; i < All_Catagary.Count; i++)
{
Button Productbtn = new Button();
Productbtn.Text = All_Catagary[i].ToString();
string Command = "SELECT [image] FROM tbl_product where name ='" + Productbtn.Text + "'";
string path = OperationAccess.GetImage(Command);
string appPath = Path.GetDirectoryName(Application.ExecutablePath) + @"\ProductImage\";
string TotalPath = appPath + path;
Productbtn.Image = System.Drawing.Image.FromFile(TotalPath);
Productbtn.Visible = true;
Productbtn.Location = new Point(3 + repetition * 107, 3);
Productbtn.Height = 54;
Productbtn.Width = 110;
Productbtn.BackColor = Color.FromArgb(40, 40, 40);
Productbtn.ForeColor = Color.White;
Productbtn.Top =10;
Productbtn.Font = new Font("Lucida Console", 16);
buttons.Add(Productbtn);
repetition++;
this.panel9.Controls.Add(Productbtn);
Productbtn.Click += new EventHandler(Productbtn_Click);