Hello,
I have numerous graphics button with 3 pics. I'm wondering whether there is a mean to set a label centered in both direction over the image. Is there a way to set a color to this label? This would avoid the creation of many images, 3 for each button which is quite cumbersome.
Thank you.
Center label on a graphic button
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
Center label on a graphic button
Nicolas
LC 7.1 on Windows 8.1 and on MAC OS 10.10.5 Xcode 6.4 - 7.1
LC 7.1 on Windows 8.1 and on MAC OS 10.10.5 Xcode 6.4 - 7.1
Re: Center label on a graphic button
Hi kolia,
1. welcome to the forum!
2. Yes, there is new "icongravity" property that you can use:
...
set the icongravity of btn "you button here" to "center"
...
will do what you need, check the dictionary for more info!
For color, set the TEXT color of your button in the inspector!
Best
Klaus
1. welcome to the forum!

2. Yes, there is new "icongravity" property that you can use:
...
set the icongravity of btn "you button here" to "center"
...
will do what you need, check the dictionary for more info!
For color, set the TEXT color of your button in the inspector!
Best
Klaus
Re: Center label on a graphic button
Hi Klaus
This is just excellent news. This will save a lot of long hours designing nice butons. Thanks a lot. As far as I understand this property has to be set by code, am I right?
Just fyi, I've been developping stacks using Hypercard in the ... 90's. It was a fantastic environment. Since then, I've been mainly using several flavors of Visual Studio. I'm very enthousiastic to develop code with LC.
This is just excellent news. This will save a lot of long hours designing nice butons. Thanks a lot. As far as I understand this property has to be set by code, am I right?
Just fyi, I've been developping stacks using Hypercard in the ... 90's. It was a fantastic environment. Since then, I've been mainly using several flavors of Visual Studio. I'm very enthousiastic to develop code with LC.
Nicolas
LC 7.1 on Windows 8.1 and on MAC OS 10.10.5 Xcode 6.4 - 7.1
LC 7.1 on Windows 8.1 and on MAC OS 10.10.5 Xcode 6.4 - 7.1
Re: Center label on a graphic button
Hi kolia,
Best
Klaus
that is correct, there is no setting in the "Inspector" for this.kolia wrote:As far as I understand this property has to be set by code, am I right?
You will love it, and maybe hate it from time to timekolia wrote:Just fyi, I've been developping stacks using Hypercard in the ... 90's. It was a fantastic environment. Since then, I've been mainly using several flavors of Visual Studio. I'm very enthousiastic to develop code with LC.

Best
Klaus
Re: Center label on a graphic button

Cheers
Nicolas
Nicolas
LC 7.1 on Windows 8.1 and on MAC OS 10.10.5 Xcode 6.4 - 7.1
LC 7.1 on Windows 8.1 and on MAC OS 10.10.5 Xcode 6.4 - 7.1