Posts: 1,126
Joined: Mar 2012
Reputation:
37
MassIV
Skilled Skinner
Posts: 1,126
You might need to be more specific.
But have you tried using a variable as label, and then give the variable content different conditions?
[RELEASE] Metroid
[RELEASE] IrcChat
Posts: 4
Joined: Dec 2014
Reputation:
0
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...
Posts: 4
Joined: Dec 2014
Reputation:
0
2014-12-12, 07:00
(This post was last modified: 2014-12-12, 07:09 by BigMan.)
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...
Posts: 17,687
Joined: Aug 2007
Reputation:
612
Hitcher
Team-Kodi Member
Posts: 17,687
Do you mean from different labels?
If so, Control.GetLabel(ID).
Also, ask a mod to move this to Skin Development.
Posts: 4
Joined: Dec 2014
Reputation:
0
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>
Posts: 1,126
Joined: Mar 2012
Reputation:
37
MassIV
Skilled Skinner
Posts: 1,126
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.
[RELEASE] Metroid
[RELEASE] IrcChat