Custom radio button icons

Paul Hibbert paul at livecode.org
Tue Oct 13 17:02:39 EDT 2015


Instead of spaces you can also use 'tabs'…

set the name of bin “myRadioButton" to tab & “myButton”

I don’t know if there’s a way to adjust the tab though!

Paul

> On 13 Oct 2015, at 13:51, Scott Rossi <scott at tactilemedia.com> wrote:
> 
> The only way I could figure out how to do this is to set the textAlign to
> left, the iconGravity to left, and insert a fixed amount of space
> characters before the button's text label.
> 
> There really should be easier way to do this, like having a separate
> iconMargin property to position the icon independently of the text.
> 
> (Whoever came up with "iconGravity" as the icon alignment property name
> will have to choose something equally scifi for icon margins, like
> "iconForceField" or "iconWarpBarrier").
> 
> Regards,
> 
> Scott Rossi
> Creative Director
> Tactile Media, UX/UI Design
> 
> 
> 
> 
> On 10/13/15, 1:07 PM, "use-livecode on behalf of J. Landman Gay"
> <use-livecode-bounces at lists.runrev.com on behalf of
> jacque at hyperactivesw.com> wrote:
> 
>> I need to assign a custom icon for a whole lot of radio buttons. I want
>> them to use the same spacing as the default radio button: icon at the
>> left, a small margin, then the button text.
>> 
>> Assigning a custom icon draws it at the right. Setting the textalign to
>> "right" moves the icon to the correct place at the left, but the button
>> text is pushed to the right margin. I want the text to be offset the
>> same distance from the icon as the default radio button.
>> 
>> I can resize the button to push the text over to the left, but I don't
>> want to because the stack is internationalized and every button is
>> currently wide enough to accomodate all languages it supports.
>> 
>> If I set the iconGravity to "left" instead, the icon and text are drawn
>> on top of each other at the left margin.
>> 
>> If I really do have to resize them all, it will have to be dynamically
>> on preOpenCard which I'd like to avoid. It seems like there has to be an
>> easier way. Is there?
>> 
>> -- 
>> Jacqueline Landman Gay         |     jacque at hyperactivesw.com
>> HyperActive Software           |     http://www.hyperactivesw.com
>> 
>> _______________________________________________
>> use-livecode mailing list
>> use-livecode at lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your
>> subscription preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
> 
> 
> 
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode




More information about the use-livecode mailing list