more info about Dialog.browse and Dialog.numeric please - Printable Version +- Kodi Community Forum (https://forum.kodi.tv) +-- Forum: Development (https://forum.kodi.tv/forumdisplay.php?fid=32) +--- Forum: Add-ons (https://forum.kodi.tv/forumdisplay.php?fid=26) +--- Thread: more info about Dialog.browse and Dialog.numeric please (/showthread.php?tid=22578) |
more info about Dialog.browse and Dialog.numeric please - solexalex - 2006-10-12 Hi ! I need to use the Dialog.browse xbmcgui function and would like some more features. I had a look in the xbmcgui python doc and saw : Code: browse(type,heading, shares[, extra]) -- Show a dialog 'Browse'. I need the browse function for files and I would like to be able to filter files extensions. I would like to be able to start the browser in a path and not only at the root, is it possible ? This is the command I use : Code: xbmcgui.Dialog().browse(1,"prompt","files") - "prompt" is to prompt user - "files" is to enable ALL files (not only pic files or videos files) thanks for any help PS: I need the Dialog.numeric as well. The online help from thor918 is not clear enough about 'type' parameter. Where can I get more infos ? - Nuka1195 - 2006-10-12 browse(...) browse(type, heading, shares[, mask, useThumbs, treatAsFolder]) -- Show a 'Browse' dialog. type : integer - the type of browse dialog. heading : string or unicode - dialog heading. shares : string or unicode - from sources.xml. (i.e. 'myprograms') mask : [opt] string or unicode - '|' separated file mask. (i.e. '.jpg|.png') useThumbs : [opt] boolean - if True autoswitch to Thumb view if files exist. treatAsFolder : [opt] boolean - if True playlists and archives act as folders. Types: 0 : ShowAndGetDirectory 1 : ShowAndGetFile 2 : ShowAndGetImage 3 : ShowAndGetWriteableDirectory *Note, Returns filename and/or path as a string to the location of the highlighted item, if user pressed 'Ok' or a masked item was selected. example: - dialog = xbmcgui.Dialog() - fn = dialog.browse(1, 'Xbox Media Center', 'pictures', '.jpg|.png') - Nuka1195 - 2006-10-12 numeric(...) numeric(type, heading) -- Show a 'Numeric' dialog. type : integer - the type of numeric dialog. heading : string or unicode - dialog heading. Types: 0 : ShowAndGetNumber 1 : ShowAndGetDate 2 : ShowAndGetTime 3 : ShowAndGetIPAddress *Note, Returns the entered data as a string. example: - dialog = xbmcgui.Dialog() - d = dialog.numeric(1, 'Enter date of birth') *The html docs in cvs are up to date - solexalex - 2006-10-13 Thanks a lot !!! I'm going to search for thes up to date html ! See ya - solexalex - 2006-10-13 OK, it works great. Only one thing to be sure, it is impossible to select a folder as a base for browsing ? Cause right now, all I can do is to set the shortcuts for the section I choose in my call to the browser Dialog (in my example further up, Files will show every shorcuts I've got for the File section) |