Hi Jacque, this works for iconGravity left and keeps the distance of the right aligned text at a constant distance from the icon.
-------------------------------------- on mouseUp ask "text for label of btn" if it is "" then exit mouseUp lock screen put "b1" into tBtnName set the label of button tBtnName to it put the width of button tBtnName into tButtonWidth put the leftMargin of button tBtnName into tLeftMargin put the formattedWidth of image id (the icon of btn tBtnName) into tImageWidth put measureText(the label of btn tBtnName, button tBtnName) into tTextWidth put 5 into tDistance -- change distance from Icon here put tButtonWidth - tLeftMargin - tImageWidth - tTextWidth - tDistance into tRight set the rightMargin of button tBtnName to tRight unlock screen end mouseUp ------------------------------------------------- Kind regards Bernd -- View this message in context: http://runtime-revolution.278305.n4.nabble.com/Custom-radio-button-icons-tp4697400p4697413.html Sent from the Revolution - User mailing list archive at Nabble.com. _______________________________________________ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode