-2

I have been trying to remove a blank space at the beginning of a libgdx table (it is a table inside a table inside a scrollPane).

The only thing I have found on the matter is to remove the line

setFillParent(true);

And I dont have that anywhere in my code

here is my adding to the table

colorTable.add(colorTitleBar).width(350).height(120);
colorTable.row();
colorTable.add(colorChoices).width(350).height(120);
colorTable.pack();

Here is a screen shot of the problem it is in the colors table

Blank padding on colors table

Can anybody help me with this?

Héctor
  • 24,444
  • 35
  • 132
  • 243
Arcxz
  • 65
  • 1
  • 11

1 Answers1

1

You can do it like this:

// set padTop if you want to leave some space at the top
colorTable.add(colorTitleBar).width(350).height(120).expandY().top().padTop(...);
colorTable.row();

And take a look at LibGDX wiki for Table

Arctic45
  • 1,078
  • 1
  • 7
  • 17