# Bounds Problem with a Table List Box

**URL:** <https://forum.juce.com/t/bounds-problem-with-a-table-list-box/64707>\
**Category:** Development\
**Created:** [December 21, 2024, 2:07pm UTC](https://forum.juce.com/t/bounds-problem-with-a-table-list-box/64707 "2024-12-21T14:07:12Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![MartinMM](https://avatars.discourse-cdn.com/v4/letter/m/9dc877/32.png) [@MartinMM](https://forum.juce.com/u/MartinMM)\
**Post date:** [December 21, 2024, 2:07pm UTC](https://forum.juce.com/t/bounds-problem-with-a-table-list-box/64707/1 "2024-12-21T14:07:13Z")

</div>

I did implement a Table List Box class following the JUCE example code. I did use the Label and ToggleButton component. Since I wanted to have a visual grid I first tried to implement this in the paintCell Method but it seems using a component linked to a cell this does not get called. I ended up implementing paintOverChildren() in the drived ToggleButton class. This did not work in the beginning and the reason was this:

I used getBounds() and then Graphics::drawRect(). It turned out that the x-Value of the getBounds() result had a value (320 in this case) that did not change. After setting the x-Value to 0 it worked.

Any Ideas why the bounds of the component do not match the bounds of the canvas?
