text shift not work in buttons?

LiveCode is the premier environment for creating multi-platform solutions for all major operating systems - Windows, Mac OS X, Linux, the Web, Server environments and Mobile platforms. Brand new to LiveCode? Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
billworld
Posts: 188
Joined: Sat Oct 25, 2008 12:32 am

text shift not work in buttons?

Post by billworld » Mon Dec 01, 2008 2:30 am

The following code will shift text in text fields (when referenced), but, won't shift the text in buttons. Is this expected behavior? If so, how do you overcome the problem that the built-in text shift for buttons is NOT vertically centered?

Code: Select all

on mouseup
    set the textshift of char 1 to -1 of me to 2
end mouseup

Lynn P.
Posts: 79
Joined: Sun Apr 09, 2006 1:09 pm

Post by Lynn P. » Mon Dec 01, 2008 3:27 am

Hi Bill ~
You can set the: bottomMargin, topMargin, leftMargin and rightMargin in pixels, to move the button text right where you wish as:

Code: Select all

set the bottomMargin of btn "myButton" to 30

billworld
Posts: 188
Joined: Sat Oct 25, 2008 12:32 am

Post by billworld » Mon Dec 01, 2008 6:11 am

That works. Thanks!
Lynn P. wrote:Hi Bill ~
You can set the: bottomMargin, topMargin, leftMargin and rightMargin in pixels, to move the button text right where you wish as:

Code: Select all

set the bottomMargin of btn "myButton" to 30

Post Reply

Return to “Getting Started with LiveCode - Experienced Developers”