# How to scale LibGdx TextButton?

Apparently textButton.setScale() is not working. Even when the scale is set to 0.1, the button is displayed in it's original size.

How to properly scale a TextButton in LibGdx? The official documentation doesn't provide any details.

• After setting the scale, have you tried setting its width and height like button.setWidth(button.getPrefWidth())? – StrongJoshua Jul 26 '15 at 17:46
• @StrongJoshua Okay I tried it but that's not working either. – WeirdElfB0y Jul 26 '15 at 18:07

A little late but to answer my own question, you have to setTransform(true) if you're scaling a Button or Table. So in my case:

textButton.setTransform(true);
textButton.setScale(0.5f);


You should use a table to setup. Tables can be aligned and there cells sizes can change. You can do something like:

table.row();