# \[ListBox\] How do I know if a row is expandable or not ?

**URL:** <https://forum.xojo.com/t/listbox-how-do-i-know-if-a-row-is-expandable-or-not/24465>\
**Category:** General\
**Created:** [May 25, 2015, 12:35pm UTC](https://forum.xojo.com/t/listbox-how-do-i-know-if-a-row-is-expandable-or-not/24465 "2015-05-25T12:35:38Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jean-Yves\_Pochez](https://forum.xojo.com/user_avatar/forum.xojo.com/jean-yves_pochez/32/21769_2.png) [@Jean-Yves\_Pochez](https://forum.xojo.com/u/Jean-Yves_Pochez)\
**Post date:** [May 25, 2015, 12:35pm UTC](https://forum.xojo.com/t/listbox-how-do-i-know-if-a-row-is-expandable-or-not/24465/1 "2015-05-25T12:35:38Z")

</div>

Hi,

I have a listbox with hierarchical items inside (at more than 1 level for some of them)  
and with checkboxes on the first column.  
I want to save the states of the checkboxes, so I loop throught the list to find the correct values of the checkboxes  
but  
How do I know if a row has been expanded or not ?  
there is the Expanded funtion but the row has to be added with addfolder  
how can I know if a row has been added by addfolder or addrow ?

thanks.

---

<div class="post-metadata">

**Author:** ![KarenA](https://forum.xojo.com/letter_avatar_proxy/v4/letter/k/c89c15/32.png) [@KarenA](https://forum.xojo.com/u/KarenA)\
**Post date:** [May 25, 2015, 1:06pm UTC](https://forum.xojo.com/t/listbox-how-do-i-know-if-a-row-is-expandable-or-not/24465/3 "2015-05-25T13:06:11Z")

</div>

What version of Xojo?

The current version has a function ListBox.RowIsFolder(row as integer) as Boolean. It actually has a setter as well which allows you to make a row into a folder even if it was not added with AddFolder.

If the version you are using does not support that then store if the row is a folder in the rowtag whenever you do an addFolder

- Karen

---

<div class="post-metadata">

**Author:** ![Jean-Yves\_Pochez](https://forum.xojo.com/user_avatar/forum.xojo.com/jean-yves_pochez/32/21769_2.png) [@Jean-Yves\_Pochez](https://forum.xojo.com/u/Jean-Yves_Pochez)\
**Post date:** [May 25, 2015, 1:19pm UTC](https://forum.xojo.com/t/listbox-how-do-i-know-if-a-row-is-expandable-or-not/24465/4 "2015-05-25T13:19:45Z")

</div>

thanks, I’m still in RS2012 so there is not that function…  
one reason to move to recent xojo then…

---

<div class="post-metadata">

**Author:** ![system](https://forum.xojo.com/uploads/default/original/1X/455b4dcc0e61630e9f81940004ddffa49c432a46.png) [@system](https://forum.xojo.com/u/system)\
**Post date:** [October 29, 2020, 5:46pm UTC](https://forum.xojo.com/t/listbox-how-do-i-know-if-a-row-is-expandable-or-not/24465/5 "2020-10-29T17:46:06Z")

</div>


