mardi 7 avril 2015

Ho to Increase/Change font size from using combo box

I have gridview with five columns. from the second gridview cells i have a column called font size which i have used combo-box and give static numbers like (2.4.6.8.10).


The purpose of font size is, when you select any number from the combo box, it must change the font size text for that row.


I have created a combo-box and a label which i will select the font size and the label will change the text size according to the selected size. I am falling to apply this to the datagridview where it will change the whole cells for that row


code



private void comboBox1_SelectedIndexChanged(object sender, EventArgs e)
{
lblchangesize.Font = new Font(lblchangesize.Font.FontFamily, Convert.ToInt32(comboBox1.SelectedItem), lblchangesize.Font.Style);
}

Aucun commentaire:

Enregistrer un commentaire