Button:setlabel Messes Up The Offset When Attached To A Button Event

Thank you Danny. Is your fix available on daily build 1079 or will it be available on a newer daily build? I haven’t seen it in the 1079 release notes but maybe I’m missing something.

Either 1080 or 1081 i believe. Thanks

Thank you for the quick fix Danny. This fix really helped me out. Thanks.

Hi (again),

I’m looking for the daily builds and I haven’t seen the fix yet. ( Case: 22445 ) Is there a problem or is the fix included but not noted on the daily builds page?

Thank you,

Serkan

This issue is also affecting me. The text moves away as soon as I do a setLabel()

Okay so I did some testing and I have a workaround. Use this function on your button widget to change the label and it’ll preserve the yOffset.

local function setLabel(obj, text)

    if obj.origLabelY == nil then

        obj.origLabelY = obj._view._label.y

    end

    obj:setLabel(text)

    obj._view._label.y = obj.origLabelY

end

Hi bfintal,

Thanks for the workaround. It is working as intended. Thank you so much.