jeudi 9 février 2017

c# - How to get a black solid background behind button text

Vote count: 0

This is the effect that I want: The text of the button having a black background.

enter image description here

This is how I am currently generating my button:

 //Button generated to add to the tab page (remmember buttons represent products)
                    Button b = new Button();

                    //Giving button appropiate size so it looks good and is suffient size to be touch screen compatible
                    b.Size = new Size(80, 80);
                    ////Giving it a better font
                    int newSize = 10;
                    //b.Font = new Font("Imperium Hollow", newSize);
                    b.ForeColor = Color.White;

                    //Displaying the Product/Buttons details on the button.
                    b.Text = row["Description"].ToString() + Environment.NewLine + "£" + Convert.ToDecimal(row["Price"]);

I fount this on the internet but I am not sure how to implement it with my code http://ift.tt/2klfDov

thanks.

asked 33 secs ago

Let's block ads! (Why?)



c# - How to get a black solid background behind button text

Aucun commentaire:

Enregistrer un commentaire