Control like combo box .....

  Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
slinuxgeek Offline
Senior Member
Posts: 219
Joined: Feb 2012
Reputation: 0
Post: #1
Is there any control which can display pull down menu or combo box , which occupies place of single control like textbox or button, but when you click on the arrow on right side of it , it will display list of choices , you select one choice ,
then list disappears & the selected choice text appears on the control as label & according to selection some action is fired.

[Image: feXy6.png]

Thank You.
find quote
jmarshall Offline
Team-XBMC Developer
Posts: 26,221
Joined: Oct 2003
Reputation: 178
Post: #2
No.

Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


[Image: badge.gif]
find quote
Hitcher Offline
Skilled Skinner
Posts: 10,881
Joined: Aug 2007
Reputation: 101
Location: Eastleigh, UK
Post: #3
But it's possible to make your own.

When you click the button set focus on a list control (which is hidden unless focused) which contains the choices. When a choice is selected set focus back to the button which displays the string you picked.
find quote
slinuxgeek Offline
Senior Member
Posts: 219
Joined: Feb 2012
Reputation: 0
Post: #4
Hi, Hitcher Thanks for Help.
I tried your suggestion , I put one list control (with two choices) just below a button with following condition:
<visible>Control.HasFocus(4) | Control.HasFocus(5) </visible>

where 4 is id of button & 5 is id of the list control. when I move mouse over button the list becomes visible otherwise not visible. This is ok but I want to that list should be visible when I click on the button not just focus,
so what should be the condition in <visible> ?? </visible> of list control ?

And when I click on a choice of the list control the action is performed which I have written in
<onclick> ... </onclick>
but the label of the above button should also be changed as with selected choice label & list should become invisible.
So how can I do that?

Please HELP Thank You.
find quote
`Black Offline
Team-Kodi Member
Posts: 2,436
Joined: Apr 2009
Reputation: 72
Location: Germany
Post: #5
Add <visible allowhiddenfocus="true">Control.HasFocus(5)</visible> to the list control. To your button add <onclick>SetFocus(5)</onclick>.

To your list items add <onclick>SetString(choice,label of the item)</onclick>. You can display the string with $INFO[Skin.String(choice)].

[Image: xp1080-21.png]
(This post was last modified: 2012-03-15 14:45 by `Black.)
find quote
slinuxgeek Offline
Senior Member
Posts: 219
Joined: Feb 2012
Reputation: 0
Post: #6
Oh Thank You `Black its working !! Smile

Ah but it tricked me !!
I move the mouse to the button & click it so it fires : SetFocus(5) means list becomes visible , then I move my mouse pointer to point to the list , in the mid time the button again gains the focus & list becomes invisible.

How can I resolve the issue ?

Thanks for Help .
(This post was last modified: 2012-03-15 15:53 by slinuxgeek.)
find quote