Discussion:
Can We Position the Label/Name of a Button
Sannyasin Brahmanathaswami via use-livecode
2018-12-04 20:01:40 UTC
Permalink
See:

Loading Image...

Syntax
set the iconGravity of button to position
Summary
Specifies wether the icon of a button is placed independently of the
label.

[#type in the entry: wether}

True, setting iconGravity does place the loc of the icon within the boundaries+ margins of the button.

But also implied it discretionary placement of the label/name (if showName is true) . But I can't find any way but "centered".. What am I missing? This is such a basic feature I would thought it was introduced in LC 2.0
Klaus major-k via use-livecode
2018-12-04 20:34:28 UTC
Permalink
Hi Swami
See: http://wiki.hindu.org/screenshots/button-label-center.png
Syntax
set the iconGravity of button to position
Summary
Specifies wether the icon of a button is placed independently of the
label.
[#type in the entry: wether}
True, setting iconGravity does place the loc of the icon within the boundaries+ margins of the button.
But also implied it discretionary placement of the label/name (if showName is true) . But I can't find any way but "centered".. What am I missing? This is such a basic feature I would thought it was introduced in LC 2.0
did you take a look at the "Text" tab in the inspector for your button and set the textalign to something else than "center" (default)? :-)


Best

Klaus

--
Klaus Major
http://www.major-k.de
***@major-k.de
Richmond via use-livecode
2018-12-04 20:37:53 UTC
Permalink
Well, that'll push your button name/label right or left, but ti won't
allow you to place it in all the places where you can position an icon.

Richmond.
Post by Klaus major-k via use-livecode
Hi Swami
See: http://wiki.hindu.org/screenshots/button-label-center.png
Syntax
set the iconGravity of button to position
Summary
Specifies wether the icon of a button is placed independently of the
label.
[#type in the entry: wether}
True, setting iconGravity does place the loc of the icon within the boundaries+ margins of the button.
But also implied it discretionary placement of the label/name (if showName is true) . But I can't find any way but "centered".. What am I missing? This is such a basic feature I would thought it was introduced in LC 2.0
did you take a look at the "Text" tab in the inspector for your button and set the textalign to something else than "center" (default)? :-)
Best
Klaus
--
Klaus Major
http://www.major-k.de
_______________________________________________
use-livecode mailing list
http://lists.runrev.com/mailman/listinfo/use-livecode
Richmond via use-livecode
2018-12-04 20:36:11 UTC
Permalink
Well, you can fiddle around with topMargin and bottomMargin, but that
also affects
icon positions.

Richmond.
Post by Sannyasin Brahmanathaswami via use-livecode
http://wiki.hindu.org/screenshots/button-label-center.png
Syntax
set the iconGravity of button to position
Summary
Specifies wether the icon of a button is placed independently of the
label.
[#type in the entry: wether}
True, setting iconGravity does place the loc of the icon within the boundaries+ margins of the button.
But also implied it discretionary placement of the label/name (if showName is true) . But I can't find any way but "centered".. What am I missing? This is such a basic feature I would thought it was introduced in LC 2.0
_______________________________________________
use-livecode mailing list
http://lists.runrev.com/mailman/listinfo/use-livecode
Mike Kerner via use-livecode
2018-12-04 20:35:57 UTC
Permalink
have you tried setting the textAlign?

On Tue, Dec 4, 2018 at 3:02 PM Sannyasin Brahmanathaswami via use-livecode <
Post by Sannyasin Brahmanathaswami via use-livecode
http://wiki.hindu.org/screenshots/button-label-center.png
Syntax
set the iconGravity of button to position
Summary
Specifies wether the icon of a button is placed independently of the
label.
[#type in the entry: wether}
True, setting iconGravity does place the loc of the icon within the
boundaries+ margins of the button.
But also implied it discretionary placement of the label/name (if
showName is true) . But I can't find any way but "centered".. What am I
missing? This is such a basic feature I would thought it was introduced in
LC 2.0
_______________________________________________
use-livecode mailing list
Please visit this url to subscribe, unsubscribe and manage your
http://lists.runrev.com/mailman/listinfo/use-livecode
--
On the first day, God created the heavens and the Earth
On the second day, God created the oceans.
On the third day, God put the animals on hold for a few hours,
and did a little diving.
And God said, "This is good."
Richmond via use-livecode
2018-12-04 21:36:24 UTC
Permalink
"This is such a basic feature I would thought it was introduced in LC 2."

Well, um, yes . . .

I suspect that quite a lot of us have things that we think of as basic
features,
and I suspect they are all different.

I'm not sure how essential being able to put a button's label in the
bottom right-hand
corner is, especially as that can easily be faked by using an image as a
button.

Richmond.
Post by Sannyasin Brahmanathaswami via use-livecode
http://wiki.hindu.org/screenshots/button-label-center.png
Syntax
set the iconGravity of button to position
Summary
Specifies wether the icon of a button is placed independently of the
label.
[#type in the entry: wether}
True, setting iconGravity does place the loc of the icon within the boundaries+ margins of the button.
But also implied it discretionary placement of the label/name (if showName is true) . But I can't find any way but "centered".. What am I missing? This is such a basic feature I would thought it was introduced in LC 2.0
_______________________________________________
use-livecode mailing list
http://lists.runrev.com/mailman/listinfo/use-livecode
Paul Hibbert via use-livecode
2018-12-04 23:32:43 UTC
Permalink
especially as that can easily be faked by using an image as a button.
But if you do need text for any reason, you can fudge it by putting returns before the text label to move it down, or after to move it up, and of course as already pointed out, use textAlign for Left, Centre or right.

Tested on a Mac (IDE & SA) only, no idea if this works on Win or Linux, not expected to work on Mobile and I doubt that it works with HTML5.

Paul

Loading Image... <Loading Image...
Sannyasin Brahmanathaswami via use-livecode
2018-12-05 14:37:24 UTC
Permalink
Paul wrote: "you can fudge it by putting returns before the text label to move it down"

Paul wins! Sheesh, why didn't I think of that. Change backgroundcolor of the button, iconGravity to top, adjust bottom margin accordingly, text-align center

You get

Loading Image...

Wow, I was using three objects before this,

rectangle graphic|image|field with text

and grouping them, are getting the parent of the target....

BR



Loading...