|
SageTV Studio Discussion related to the SageTV Studio application produced by SageTV. Questions, issues, problems, suggestions, etc. relating to the Studio software application should be posted here. |
|
Thread Tools | Search this Thread | Display Modes |
#1
|
|||
|
|||
Get currently focused widget?
Is there a way to get the currently focused widget so that you could enumerate/search its child widgets?
__________________
-Craig |
#2
|
||||
|
||||
Not as a Widget object, no. GetFocusContext gets the variable context of the focused widget, but not a handle to the Widget object itself. What exactly are you hoping to accomplish by enumerating child widgets that you can't do by creating some Attributes and using GetFocusContext to retrieve their runtime values? There's actually not a lot you can do with WidgetAPI calls that's useful from a UI perspective. Those calls are mostly meant for operating on the widget tree at import/export time or during Studio editing.
This is all assuming you're talking about the UI focus in the Sage UI window. If you're talking about the selected widget in the Studio window, that's a whole different story, and yes, there are ways to access that info using my Studio Tools API.
__________________
-- Greg |
#3
|
|||
|
|||
I am tracking the "text" of the currently selected item in the Sage UI. I have been using the GetFocusContext() / attribute approach and it works quite well but I then have to add an attribute to everything I want to track. This is not a big deal but I was just wondering if there was a generic way to get at the currently selected widget and then find the first child text widget so that it could be more "automatic". I guess not. Thanks for the reply.
__________________
-Craig |
#4
|
||||
|
||||
You could use a Theme to automatically generate the Text widget from the Attribute. Then you wouldn't have to repeat both the Text and the Attribute on every item.
Code:
(Item) Item 1 (Attr) Var = "some text" (Theme) Item theme (Item) (Action) Var (Text) (Item) Item 2 (Attr) Var = "different text" (Theme) Item Theme (Item) Item 3 (Attr) Var = "more text" (Theme) Item Theme
__________________
-- Greg |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
MediaPlayer Plugin/STV Import: Winamp Media Player Plugin | deria | SageTV Customizations | 447 | 12-11-2010 07:38 PM |
When are Text widget properties refreshed? | JREkiwi | SageTV Studio | 9 | 05-03-2007 09:35 AM |
Scaling Text widget size within image widget area | Morgan111 | SageTV Studio | 2 | 12-04-2006 02:16 PM |
Studio/API wishlist | GKusnick | SageTV Studio | 10 | 07-25-2006 11:20 AM |
How do you determine index number of a widget? | jbuszkie | SageTV Studio | 2 | 01-13-2006 03:12 PM |