Added resizable panel based on content added. Inspired by Nikhila's code
in PCTab. Thanks Nikhila!