
monkeysource
Visitor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-08-2016
06:37 AM
Markup Grid get focussed Child
Hi,
I have a MarkupGrip and am observing the itemFocused field. However, I'm struggling to get the focused child Node then this event is fire.
In the below code I can get the focused index and content, but what a I really what is the SG Node so I can find out it's screen position.
Sorry if this is a newbie question.
Thanks,
Ryan
I have a MarkupGrip and am observing the itemFocused field. However, I'm struggling to get the focused child Node then this event is fire.
In the below code I can get the focused index and content, but what a I really what is the SG Node so I can find out it's screen position.
Sorry if this is a newbie question.
sub onItemFocused()
focused = m.grid.itemFocused
content = m.grid.content.getChild(focused)
' but how to get the Node for the focused item. I'd like this so I can find out it's position on screen
end sub
Thanks,
Ryan
2 REPLIES 2

TheEndless
Channel Surfer
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-08-2016
08:31 AM
Re: Markup Grid get focussed Child
You should be able to use one of the subBoundingRect methods to find the position of the focused item.
My Channels: http://roku.permanence.com - Twitter: @TheEndlessDev
Instant Watch Browser (NetflixIWB), Aquarium Screensaver (AQUARIUM), Clever Clocks Screensaver (CLEVERCLOCKS), iTunes Podcasts (ITPC), My Channels (MYCHANNELS)
Instant Watch Browser (NetflixIWB), Aquarium Screensaver (AQUARIUM), Clever Clocks Screensaver (CLEVERCLOCKS), iTunes Podcasts (ITPC), My Channels (MYCHANNELS)

monkeysource
Visitor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-09-2016
03:08 AM
Re: Markup Grid get focussed Child
Thanks, subBoundingRect does work. But the odd thing is, the string passed as the item number seems to be ignored.
For a 30 item grid the following always produces the same result:
The Rect returned is always the rect of the focused cell and not the rect of the item in the grid. Is that by design?
Thanks,
Ryan
For a 30 item grid the following always produces the same result:
grid.subBoundingRect("item1")
grid.subBoundingRect("item20")
The Rect returned is always the rect of the focused cell and not the rect of the item in the grid. Is that by design?
Thanks,
Ryan