# LibGDX ImageButton resizeing

How can I resize ImageButton ? It show very big on screen . How I know it is an Actor and it is not resizing automatically . I cant find the method for resizing it. Any ideas?

• Take a look at this UI test: github.com/libgdx/libgdx/blob/master/tests/gdx-tests/src/com/… – ashes999 Aug 4 '14 at 9:36
• shall I use stage.getViewport().update(width, height, true); ? – Vahe Muradyan Aug 4 '14 at 9:48
• I'm not sure, sorry. – ashes999 Aug 4 '14 at 13:49
• If I knew, I would post a proper answer :) take a look at the sample (test) I linked, it should hopefully work well for you, and you can post your solution when you figure it out. I didn't see any obvious way to resize the button either and I don't use Actor2d.ui. – ashes999 Aug 4 '14 at 15:26
• and what are you using for buttons that contain only image? – Vahe Muradyan Aug 5 '14 at 12:34

Put your ImageButton in a table. Set the size of it. Add the table as an actor in your stage.

Here is an example:

ImageButton. ImageButton Style btnStyle new ImageButton.ImageButtonStyle ();
`