I have a problem where, depending on the text of a button, the display of
that text seems to change size or alignment.
Here is the code:
HomeScoreNameButton.ForeColor = Color.Green;
HomeScoreNameButton.Font = new System.Drawing.Font("Tahoma",
8.50F, System.Drawing.FontStyle.Regular,
System.Drawing.GraphicsUnit.Point, ((System.Byte)(0));
this.HomeScoreNameButton.Location = new System.Drawing.Location(10,10);
this.HomeScoreNameButton.Name = "HomeScoreNameButton";
this.HomeScoreNameButton.Size = new System.Drawing.Size(24,16);
this.HomeScoreNameButton.Text = "Sunset";
this.HomeScoreNameButton.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
the buttons are small (24,16) for a reason, and I can't make them bigger.
when the text of the button (which changes), is too long to display, it is
simply truncated from the right.
If the button text is "Sunset Girls", then it displays as "Sunset G"
(truncated to fit), and displays properly.
However, if the text is "Sunset Boys", then it displays as "Sunset"
(truncated), which is fine, but now the "S" (capital S) loses the topmost
line of the font, as if the vertical alignment of the button text has
changed, or the size of the font has changed.
Any ideas about what is happening?
Terry Brown
www.stickmansoftware.com