# How to change ListBox row component size?

**URL:** <https://forum.juce.com/t/how-to-change-listbox-row-component-size/40104>\
**Category:** General JUCE discussion\
**Created:** [June 14, 2020, 10:19am UTC](https://forum.juce.com/t/how-to-change-listbox-row-component-size/40104 "2020-06-14T10:19:25Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![geliang87](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/geliang87/32/7861_2.png) [@geliang87](https://forum.juce.com/u/geliang87)\
**Post date:** [June 14, 2020, 10:19am UTC](https://forum.juce.com/t/how-to-change-listbox-row-component-size/40104/1 "2020-06-14T10:19:25Z")

</div>

Hi JUCE masterminds,

I’m implementing my customized component as ListBox row component. Basically each row is a large graph. I’ve programmed my own component and refreshComponentForRow method in ListBoxModel. Graphs are displayed in each row. However it’s quite small. I declared setSize method for the right dimension. It’s not working. Does anyone know where my issue is?

Many thanks,  
Liang

---

<div class="post-metadata">

**Author:** ![MBO](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/mbo/32/5045_2.png) [@MBO](https://forum.juce.com/u/MBO)\
**Post date:** [June 15, 2020, 6:50pm UTC](https://forum.juce.com/t/how-to-change-listbox-row-component-size/40104/2 "2020-06-15T18:50:40Z")

</div>

`setRowHeight` member function of `ListBox` component is responsible for row height.

---

<div class="post-metadata">

**Author:** ![HowardAntares](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/howardantares/32/4629_2.png) [@HowardAntares](https://forum.juce.com/u/HowardAntares)\
**Post date:** [June 15, 2020, 6:53pm UTC](https://forum.juce.com/t/how-to-change-listbox-row-component-size/40104/3 "2020-06-15T18:53:57Z")

</div>

Be aware that that sets the height for _all_ rows. There does not appear to be a way to have different heights for different rows, if that’s your goal.

---

<div class="post-metadata">

**Author:** ![MBO](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/mbo/32/5045_2.png) [@MBO](https://forum.juce.com/u/MBO)\
**Post date:** [June 15, 2020, 6:58pm UTC](https://forum.juce.com/t/how-to-change-listbox-row-component-size/40104/4 "2020-06-15T18:58:14Z")

</div>

Yes, I think that OP wants to set row heights by setting sizes of internal components. In that case it will be easier to implement another ListBox-like component based on `ViewPort` or on a basic component with scrollbar(s).
