Label position of button

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

Post Reply
MikeLima
Posts: 4
Joined: Sun Jun 18, 2017 3:28 pm

Label position of button

Post by MikeLima » Tue Jul 18, 2017 7:07 am

Greetings

I have a usual button and I use the icon to skin it. I want to use the buttons label to show the text (while the icon is only background).
The problem: Whenever I turn on the "Show Name" property the icon resizes (about half of it's size).

So the question is: How to use the label correctly along with icon "background" to have the right size ?

Thanks very much in advance
Michael Lurie

jmburnod
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 2729
Joined: Sat Dec 22, 2007 5:35 pm
Contact:

Re: Label position of button

Post by jmburnod » Tue Jul 18, 2017 7:39 am

Hi Michael,
As far i knowI believe there is no way to do that with btn only.
I use a group when i need a control with icon and label, one grc por image for background, one field for text and one transparent btn.
Best regards
Jean-Marc
https://alternatic.ch

MikeLima
Posts: 4
Joined: Sun Jun 18, 2017 3:28 pm

Re: Label position of button

Post by MikeLima » Tue Jul 18, 2017 11:42 am

Trying now with groups. But also with groups the mouseOver of the button is not working where the label covers the button.

Klaus
Posts: 14177
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: Label position of button

Post by Klaus » Tue Jul 18, 2017 12:26 pm

Hi Mike,

not sure I understand you problem, but it sounds like you should play
with the "icongravity" property of your button.


Best

Klaus

MikeLima
Posts: 4
Joined: Sun Jun 18, 2017 3:28 pm

Re: Label position of button

Post by MikeLima » Tue Jul 18, 2017 1:06 pm

Thanks Klaus. That solved the problem. One last question: Is there a way to add this "propertiy" to the button by default ? I played with "custom" but not sure if this is the right place.

Thanks again
Michael

Post Reply