UI Element positioning with Python and WindowXML? - 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: UI Element positioning with Python and WindowXML? (/showthread.php?tid=68473) |
UI Element positioning with Python and WindowXML? - mr. kav - 2010-01-25 Hi, I want to position a specific UI element, let's say an image on the right top corner of the screen. For the example, it's a 100px wide and I want it to be shown in whole up to the right-top edge. I tried the most straightforward approach of ...control.setPosition(self.getWidth()-OBJECT_WIDTH, 0). The problem is with the aspect ratios, resolutions and other things I understand very little on. Can someone throw me in the right direction?? Thanks, --mr. kav - jmarshall - 2010-01-26 If you're doing it from XML then it's easy - just use 200r for 200 from the right. You can also specify how the aspectratio is controlled. Cheers, Jonathan - mr. kav - 2010-01-26 works like a charm thanks. I used 200r and 200t as point of reference in posx/y. Where can I read more about this functionality? it will save a lot of questions - jmarshall - 2010-01-26 All the skinning docs is in the wiki. It's nowhere near complete I'm afraid, but should cover the basics. |