# Tab-panel is not sized properly

**URL:** <https://racket.discourse.group/t/tab-panel-is-not-sized-properly/1196>\
**Category:** Questions & Answers\
**Tags:** gui\
**Created:** [August 1, 2022, 8:00pm UTC](https://racket.discourse.group/t/tab-panel-is-not-sized-properly/1196 "2022-08-01T20:00:09Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![dstorrs](https://avatars.discourse-cdn.com/v4/letter/d/898d66/32.png) [@dstorrs](https://racket.discourse.group/u/dstorrs)\
**Post date:** [August 1, 2022, 8:00pm UTC](https://racket.discourse.group/t/tab-panel-is-not-sized-properly/1196/1 "2022-08-01T20:00:09Z")

</div>

Given this code:

```scheme
#lang racket/gui

(define frame (new frame% [label "Example"]))
(define panel (new vertical-panel%
                   [parent frame]
                   ))
(define tab-panel (new tab-panel%
                       [parent panel]
                       [choices (list "Overall"
                                      "Users"
                                      "Addresses")]))

```

I was expecting to get a dialog that showed a tab panel with three tabs on it. Instead, what I got was a dialog sized down so small that you couldn't see all of its left-side control buttons or any of the tab panel.

Apparently, if I give the tab panel some content then this issue goes away. OTOH, [the documentation](https://docs.racket-lang.org/gui/windowing-overview.html#%28part._containeroverview%29) says:

> Each container arranges its children using the natural size of each child, which usually depends on instantiation parameters of the child, such as the label on a button or the number of choices in a radio box.

I feel like the tabs on a tab panel should be part of the 'natural size' of that panel. Clearly I'm misunderstanding something. Can anyone offer some pointers?
