![]() |
|
|||||||
| Plugin/Script (Python) Development Developers forum for XBMC Python Plugins/Scripts. Scripters/coders only! Not for posting feature requests, bugs, or end-user support requests! |
![]() |
|
|
Thread Tools | Search this Thread | Display Modes |
|
|
#1 |
|
Senior Member
Join Date: Oct 2003
Location: Netherlands
Posts: 136
![]() |
i have a list of items:
item 1 item 2 item 3 but i want them labeled: item 1 (www.address1.com) item 2 (www.address2.com) item 3 (www.address3.com) (this is must not be visible in the screen) when u select the item the address should appear in a dialog for example (test fase) who could help me, please? thanks
__________________
greets, zilvershadow designer of the kmlbrowser script. |
|
|
|
|
|
#2 | |
|
Senior Member
Join Date: Mar 2004
Posts: 174
![]() |
create two lists: one to store the list labels and one to store the equivalent value. pass the label list to the list control when creating the gui. when the user selects a value you get an index returned to you. lookup the entry in the value list using the index returned to get the actual web address. for example:
Quote:
|
|
|
|
|
|
|
#3 |
|
Senior Member
Join Date: Oct 2003
Location: Netherlands
Posts: 136
![]() |
i did it now with xbmcgui.controllist: getselectedposition() and it works.
thanks anyways now i would like to sort the list in various ways just like in my music. i want a button that can do several actions to the list. could you tell me how to do that? (i'm learning python, it's all new to me but i like it very much and i'm writing a nice script with some very nice results.) in a few days i'll show you my results. thanks
__________________
greets, zilvershadow designer of the kmlbrowser script. |
|
|
|
|
|
#4 |
|
Senior Member
Join Date: Mar 2004
Posts: 174
![]() |
python list objects have a sort() method that takes a comparison function as an argument. you can do whatever custom comparison you need to do in that function. just have a look at the tutorials and reference information at http://python.org/doc for more information.
|
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | Search this Thread |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| ControlList | fultotop | Plugin/Script (Python) Development | 1 | 2006-06-08 23:39 |
| ControlList...Scroll? | tartag | Plugin/Script (Python) Help and Support | 8 | 2005-11-29 19:59 |
| Controllist entries | Nuka1195 | Plugin/Script (Python) Development | 5 | 2005-10-20 11:01 |
| Xbmcgui controllist() | hibaby | XBMC for Xbox Specific Support | 0 | 2005-07-24 18:59 |
| New controllist functionality in cvs | Asteron | Plugin/Script (Python) Development | 5 | 2005-04-05 02:14 |