PDA

View Full Version : how to change a Widget's property in an STVi


Tiki
01-02-2007, 09:44 PM
Help. I'm working on my first import and using the flachbar import utility library (v2.0).

I've got everything working except I need to change a couple of widget properties. Specifically, I'm trying to change the "Fixed Height" property on a couple of Panel widgets and the "numRows" property on a Table widget.

I can use flachbar's findWidget() to find an the widget in the existing STV. It returns a widget object. If I try to pass that object to the SageAPI's getWidgetProprty() or SetWidgetProperty(), I get about 50 errors in the debug log.

Here is an example of the code I am trying:

oWidget = df_sageutils_Import_findWidget(“/STV/Xtra: SageTV Recordings by malore/Content/sorting =*/*/*/true/*/Show*”)

SetWidgetProperty(oWidget, “Fixed Height”, “=0.0034 * fontsize * rows * 2”)

Any ideas?

dflachbart
01-02-2007, 09:51 PM
Help. I'm working on my first import and using the flachbar import utility library (v2.0).

I've got everything working except I need to change a couple of widget properties. Specifically, I'm trying to change the "Fixed Height" property on a couple of Panel widgets and the "numRows" property on a Table widget.

I can use flachbar's findWidget() to find an the widget in the existing STV. It returns a widget object. If I try to pass that object to the SageAPI's getWidgetProprty() or SetWidgetProperty(), I get about 50 errors in the debug log.

Here is an example of the code I am trying:



Any ideas?
Try "FixedHeight" instead of "Fixed Height"... Tip: if in doubt, you can always open an STV in an editor and look at the XML for the correct attribute name

Dirk

Opus4
01-02-2007, 09:55 PM
Also see Widget property names for a list of those names.

- Andy

Tiki
01-03-2007, 10:13 PM
Thanks guys - that did the trick. I thought I had tried it that way before, but I had other issues...

Also see Widget property names for a list of those names.

- Andy
Andy - you should add the link to this post to the sticky about Studio Resources.

Opus4
01-03-2007, 11:13 PM
Andy - you should add the link to this post to the sticky about Studio Resources.Do you mean the one w/the list of all the property names? I did that last night. :)

Your question in this thread got me to start a new section in that sticky, since those posts are hard to find after a while. I also added a couple other topics I ran across.

- Andy

Tiki
01-03-2007, 11:29 PM
Yup, that's what I meant - I see it now:D