Posts: 3,956
Joined: Dec 2008
Reputation:
62
E.g.
Skin.SetString
or
SetProperty(key,value[,id])
and set label visibility based on that.
Posts: 219
Joined: Feb 2012
Reputation:
0
Any other way please !!
Thanks for reply.
Posts: 149
Joined: Apr 2011
Reputation:
1
You can try with:
<control type="button" id="8005">
<label>yourlabel</label>
<visible>Control.HasFocus(8005)</visible>
When you have focus on button, it became visible.
Posts: 17,389
Joined: Aug 2007
Reputation:
583
Hitcher
Team-Kodi Member
Posts: 17,389
Or Control.GetLabel(BUTTON_ID) if that's what you mean.
Posts: 219
Joined: Feb 2012
Reputation:
0
I actually simplified the question , actually I am trying to make a drop down menu , whose selected value will be represented by the label of the button which is on top of the menu.
menu may be achieved by a list control,which is by default hidden when user clicks on the button the drop down menu appears just below the button. user clicks on any choice of list and that choice's label becomes label of button.
I don't want the list control to become visible when button is focused but when the button is clicked.
Now there might appear a solution like:
<control type="button">
<onclick>setfocus(list_id)</onclick>
--------many lines--------
</control>
and list control will be like:
<control type="list" id="list_id">
<visible allowhiddenfocus="true">Control.HasFocus(list_id)</visible>
--------many lines--------
</control>
but in this case even if you don't click on button and simply move your mouse to the area where the list is but is hidden, the list control becomes visible which is bad.
Any Solution ?
Thanks.
Posts: 219
Joined: Feb 2012
Reputation:
0
Here is what I have done:
<control type="button">
<ondown>Skin.ToggleSetting(enable_dropdown_list)</ondown>
<ondown>setfocus(6)</ondown>
<onclick>Skin.ToggleSetting(enable_dropdown_list)</onclick>
<onclick>setfocus(6)</onclick>
</control>
Here is List control with many choices:
<control type="list" id="6">
<visible allowhiddenfocus="false">Skin.HasSetting(enable_dropdown_list) </visible>
</control>
when I press down arrow key on button the list control becomes visible but the list control does not take focus, so I can not press up and down arrow keys to traverse the choices with in list control.
If I write allowhiddenfocus="true" the list becomes visible when I move mouse over that area without any intension to see the list , which is bad.
what wrong I have written?
Thanks for help?
Posts: 4,060
Joined: Mar 2010
Reputation:
94
If you don't post the complete code it will be difficult to help you.
Posts: 2,441
Joined: Apr 2009
Reputation:
73
`Black
Team-Kodi Member
Posts: 2,441
If mouse is the problem, try adding a dummy button over the list so the button becomes focus if you move with the mouse over the hidden list.
Posts: 219
Joined: Feb 2012
Reputation:
0
Thanks for Reply `Black but there is a panel control below the list control which displays songs list which should be clickable to play the song.
As you know in any text editor like notepad you type in text area but if you click on File menu a long list of menu is displayed which occupies some part of text area but only when it is displayed other wise user is able to click on the text area where menu was visible and can type any thing.
Thank you.