View previous topic :: View next topic |
Author |
Message |
mforkner
Joined: 04 Aug 2004 Posts: 78
|
Posted: Sat Sep 01, 2007 8:18 pm Post subject: Button Properties |
|
|
When setting the text alignment properties of a button component I noticed that setting it to bottom center sets the text at the very bottom of the button, middle center is around the middle of the button, and top center is only a few pixles above middle center instead of at the top of the button. |
|
Back to top |
|
![](templates/subSilver/images/spacer.gif) |
CodeMorphis
Joined: 02 Dec 2003 Posts: 252
|
Posted: Mon Sep 03, 2007 1:59 pm Post subject: |
|
|
That is a behavior of Microsoft's Window Form and appears to be an offset issue due to the height of a default button. The Windows Form tries to maintain a margin between the text and the 4 borders of the button at all times. The default height of a button is small enough that setting it to appear at the top appears to cause an offset calculation that results in little or no change in position. To see that it is an issue with the height of the button, we can scale the button height and observe the effects with top and bottom text alignment:
Note that for the buttons with larger, non-default height, the effects of top/bottom text alignment are clearly visible but for the buttons with the default height, we get the effect that you noted. |
|
Back to top |
|
![](templates/subSilver/images/spacer.gif) |
|