I have resizeable buttons in my tool, and when button height is more than 17, I’d like it to display text. If less - no text.
So, I’m trying to do sometning like this
local function text_or_not(h)
if h > 17 then
return someText
else
return ""
--return nil
end
end
vb:button {
height = h,
text = text_or_not(h)
}
If return nil, it shows error. If return “” then no text is shown, BUT button behaves like it contains text, i.e. it’s height equals font height, which is not good. What should I do?
Same thing happened yesterday when song():undo() was freezing Renoise. I was going to post a question already but then Renoise restarted and the problem was gone by itself.