Kodi Community Forum
Solved Q: Return value from edit Control via Control.GetLabel ?? - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Development (https://forum.kodi.tv/forumdisplay.php?fid=32)
+--- Forum: Skinning (https://forum.kodi.tv/forumdisplay.php?fid=12)
+--- Thread: Solved Q: Return value from edit Control via Control.GetLabel ?? (/showthread.php?tid=348680)



Q: Return value from edit Control via Control.GetLabel ?? - mardukL - 2019-10-24

Hi, first the background,
i like to set Textlabel via an edit control which should be used as a content 'filter'

as example : filter artists

My issue is that i am unable to return the value from my edit control (id 100002).

Using Skin Strings set via button is fine, but how can i return the label of the editHuh
Video Example

I tried
with and without action
xml:

<onclick>Skin.Reset(SearchTermHUBArtist)</onclick>
<onclick>Skin.SetString(SearchTermHUBArtist,$INFO[Control.GetLabel(100002)])</onclick>

xml:

<control type="edit" id="100002">
                    <top>5</top>
                    <height>60</height>
                    <width>420</width>
                    <hinttext>Search me....</hinttext>
                    <description>My First edit control</description>
                    <texturefocus colordiffuse="white">buttons/NF_1zu5.png</texturefocus>    
                    <texturenofocus colordiffuse="44FFFFFF">buttons/button_6to1_Trans.png</texturenofocus>
                    
                    <font>MenucontrolItem</font>
                    <textoffsetx>20</textoffsetx>
                    <textoffsety>20</textoffsety>
                    <textcolor>grey</textcolor>
                    <focusedcolor>white</focusedcolor>
                    <disabledcolor>green</disabledcolor>
                    <invalidcolor>orange</invalidcolor>
                    <aligny>top</aligny>
                    <pulseonselect>no</pulseonselect>
                    <label></label>
                    <onclick>Skin.Reset(SearchTermHUBArtist)</onclick>
                    <onclick>Skin.SetString(SearchTermHUBArtist,$INFO[Control.GetLabel(100002)])</onclick>
                </control>

Content VAR
xml:
<variable name="HUB_artist_1">
        <value condition="!String.IsEmpty(Skin.String(SearchTermHUBArtist))">musicdb://artists/?xsp=%7B%22order%22%3A%7B%22direction%22%3A%22ascending%22%2C%22ignorefolders%22%3A0%2C%22method%22%3A%22sorttitle%22%7D%2C%22rules%22%3A%7B%22and%22%3A%5B%7B%22field%22%3A%22artist%22%2C%22operator%22%3A%22contains%22%2C%22value%22%3A%5B%22$INFO[Skin.String(SearchTermHUBArtist)]%22%5D%7D%5D%7D%2C%22type%22%3A%22artists%22%7D</value>
        <value condition="!String.IsEmpty(Contol.GetLabel(100002))">musicdb://artists/?xsp=%7B%22order%22%3A%7B%22direction%22%3A%22ascending%22%2C%22ignorefolders%22%3A0%2C%22method%22%3A%22sorttitle%22%7D%2C%22rules%22%3A%7B%22and%22%3A%5B%7B%22field%22%3A%22artist%22%2C%22operator%22%3A%22contains%22%2C%22value%22%3A%5B%22$INFO[Control.GetLabel(100002)]%22%5D%7D%5D%7D%2C%22type%22%3A%22artists%22%7D</value>
        <value>musicdb://artists/</value>
    </variable>



RE: Q: Return value from edit Control via Control.GetLabel ?? - ronie - 2019-10-24

have you tried Control.GetLabel(100002).index(1) ?
https://kodi.wiki/view/InfoLabels#Control


RE: Q: Return value from edit Control via Control.GetLabel ?? - mardukL - 2019-10-24

(2019-10-24, 10:38)ronie Wrote: have you tried Control.GetLabel(100002).index(1) ?
https://kodi.wiki/view/InfoLabels#Control
THANK YOU SO MUCH.

Works Perfect!!!!
Didnt recogniced that in wiki !!!