B4J Question [Solved] Accordion SelectedIndex

AHilton

Active Member
Licensed User
Longtime User
When I create one of my accordions through code (ie not via loadlayout), the pane is 'open' or selected. I'd like for it to default to 'closed'. I've tried SelectedIndex = -1 but it doesn't help. Any ideas?
 

AHilton

Active Member
Licensed User
Longtime User
That doesn't work either. The problem seems to be coming from the fact that I'm adding an accordion to each row of a listview. I'm doing that in order to get the opening/closing of the internal accordions to expand and contract properly without overrunning what's below

Here's the basics ...

Listview row
Accordion-Parent
textfield
textfield
accordion-Child

Listview row
Accordion-Parent
textfield
textfield
accordion-Child

etc...

The Child accordions are initially closed. The Parent accordions are initially open. The Child accordions are created via Loadlayout.
 
Upvote 0

AHilton

Active Member
Licensed User
Longtime User
Never mind. I found the mistake. I was adding the TitledPanes to the listview instead of the entire Accordion. It works correctly now.
 
Upvote 0
Top