Control like combo box ..... - 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: Control like combo box ..... (/showthread.php?tid=125606) |
Control like combo box ..... - slinuxgeek - 2012-03-15 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. Thank You. RE: Control like combo box ..... - jmarshall - 2012-03-15 No. RE: Control like combo box ..... - Hitcher - 2012-03-15 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. RE: Control like combo box ..... - slinuxgeek - 2012-03-15 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. RE: Control like combo box ..... - `Black - 2012-03-15 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)]. RE: Control like combo box ..... - slinuxgeek - 2012-03-15 Oh Thank You `Black its working !! 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 . |