SettingsCategory.xml - Container(5).NumItems
#1
SettingsCategory.xml grouplist id 5, I'm trying to use Container(5).NumItems to feed an animation to centre the group list depending on the number of items. However Container(5).NumItems only counts controls that can be focused so the label id 14 isn't counted and any disabled control are not counted, thus giving the wrong item count and breaking the animation.

I've also tried Container(5).NumAllIems but that doesn't even return a value. Any ideas how to get the real item count including non focusable items like label id 14 and disabled controls?

Thanks.
Reply
#2
(2020-08-23, 12:46)roidy Wrote: I've also tried Container(5).NumAllIems but that doesn't even return a value.

just in case you made this typo in your code as well, it's Container(5).NumAllItems
Do not PM or e-mail Team-Kodi members directly asking for support.
Always read the Forum rules, Kodi online-manual, FAQ, Help and Search the forum before posting.
Reply
#3
No, definitely spelt it right in the code Big Grin As I said NumAllItems doesn't even return a value for Container(5) in SettingsCategory.xml

I solved the problem another way... I didn't realise grouplist has an align tag that can be used to centre it along the orientation axis.
Reply
#4
i had a closer look and NumAllItems is indeed not implemented for grouplists.
guess it wouldn't make sense either, as grouplists can't contain folders (which is the only difference compared to NumItems)

afaik we don't have any infolabel that also counts hidden/disabled items.
Do not PM or e-mail Team-Kodi members directly asking for support.
Always read the Forum rules, Kodi online-manual, FAQ, Help and Search the forum before posting.
Reply
#5
(2020-08-23, 19:55)ronie Wrote: guess it wouldn't make sense either, as grouplists can't contain folders (which is the only difference compared to NumItems)

Sure but with a name like NumAllItems or even NumItems you'd expect it to also count non-focusable items like labels and disabled items as they both take up space in the group list and are still technically items, hidden items I can understand it not counting as they can't be seen and don't take up space.

As I said I didn't realise a grouplist could be centred using align, so it's not really a problem Big Grin
Reply

Logout Mark Read Team Forum Stats Members Help
SettingsCategory.xml - Container(5).NumItems0