Add dynamic text area to XBMC Skin
#1
Hi Guys,

I was struggling Huh to add dynamic text area to XBMC skin. I need to change the content of the text area when changing the buttons.

Hope you guys can help me on this.

Thanks in advance...!

BR,
BigMan...
Reply
#2
You might need to be more specific.

But have you tried using a variable as label, and then give the variable content different conditions?
Image [RELEASE] Metroid
Image [RELEASE] IrcChat
Reply
#3
Thank you for your heads up. I will try your suggestion too. To be frank, I'm a beginner in XBMC.

This is what I want to learn,
I added one more custom page to default XBMC main menu added two buttons that opens new window each. That window has few buttons with a text area. Now I need to know how can we change the content of the text area when we navigate among the buttons.

BR,
BigMan...
Reply
#4
Hi MassIV,
I tried your suggestion and It worked. Thank you very much...!
I added new variable to Include.xml file,
<variable name="ContentArea_1">
<value condition="Control.HasFocus(2)">Test One</value>
<value condition="Control.HasFocus(3)">Test Two</value>
<value condition="Control.HasFocus(4)">Test Three</value>
</variable>
Added the variable to label,
<label>$VAR[ContentArea_1]</label>
Now I can get the values in the variables to text area dynamically.

But I dont know how to get this this text from a text file.
<value condition="Control.HasFocus(2)">Test One</value>
Could you help me on this?


BR,
BigMan...
Reply
#5
Do you mean from different labels?

If so, Control.GetLabel(ID).

Also, ask a mod to move this to Skin Development.
Reply
#6
I have a some text in the test.txt file. I meant to say that I want to get those text to display instead of hard-code "Test One" here. My input text from a text file.

<value condition="Control.HasFocus(2)">Test One</value>
Reply
#7
Do you have a reason for wanting to read from a .txt file?

Assuming you or some application needs to change the content of the .txt file(s)?
There isn't a native way of reading non .xml files or files outside of the skin folder in the skinning engine.
So you'd have t use a simple python script to read the .txt file.
And give your label control an ID, then your script can change the label of ID.
Image [RELEASE] Metroid
Image [RELEASE] IrcChat
Reply

Logout Mark Read Team Forum Stats Members Help
Add dynamic text area to XBMC Skin0