Set focus on the last item of a container
#1
Is there any way to move the focus of a container to the last item if you don't know previously how many items there is?

I have seen the builtin functions Control.Move and SetFocus, but they can't do that (I think...)

Thanks
If I have helped you or increased your knowledge, please click the 'thumbs up' button to give thanks :)
Reply
#2
Yep.
Code:
Control.Move(200,$INFO[Container(200).CurrentItem,-])

Another way is to use SetFocus:
Code:
<onup>SetFocus(901,99999999)</onup>
99999999 is used as dummy. No container has this amount of items in a real scenario but it forces to focus the last available one.
Main: Lancool II Mesh  - Ryzen 9 5900x - MSI x570 Unify - Zotac RTX 3080 AMP HOLO - 32GB Trident Z Neo 3600 CL16 -  EVO 960 M.2 250GB / EVO 940 250GB / MX100 512GB /  Crucial P1 2TB / WD Blue 3D Nand 2TB 
Sound: Saxx AS30 DSP - Beyer Dynamic Custom One Pro 
TV: Nvidia Shield 2019 Pro- Adalight 114x LEDs - Sony 65XG9505 - Kodi / Emby - Yamaha RX-V683 - Heco Victa 700/101/251a + Dynavoice Magic FX-4
Server: i3 Skylake - 8GB - OMV4 - 22TB Storage
Reply
#3
@sualfred 
Thanks!
If I have helped you or increased your knowledge, please click the 'thumbs up' button to give thanks :)
Reply

Logout Mark Read Team Forum Stats Members Help
Set focus on the last item of a container0