codemorphis.com Forum Index codemorphis.com
Software development: pure and simple.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Button Properties

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    codemorphis.com Forum Index -> Visual Programming Forum
View previous topic :: View next topic  
Author Message
mforkner



Joined: 04 Aug 2004
Posts: 78

PostPosted: Sat Sep 01, 2007 8:18 pm    Post subject: Button Properties Reply with quote

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
View user's profile Send private message Visit poster's website
CodeMorphis



Joined: 02 Dec 2003
Posts: 252

PostPosted: Mon Sep 03, 2007 1:59 pm    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    codemorphis.com Forum Index -> Visual Programming Forum All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group