2018-06-11, 10:28
so I am attempting to make a custom notification dialog but I am running in to issues.
and i am calling it as
but using the above code does not work... can someone point me to a working example of window.xmldialog()
the xml file is
This works but i want to use a custom xml file... so i usedpython:class notify(xbmcgui.WindowDialog):
def __init__(self, *args, **kwargs):
#xbmc.executebuiltin('Container.SetViewMode(50)')
self.text = kwargs['txt']
self.note = xbmcgui.ControlLabel(x=0, y=0, width=800, height=250, label=self.text)
#self.note= self.getControl(100)
self.addControl(self.note)
python:class notify(xbmcgui.WindowXMLDialog):
def __init__(self, *args, **kwargs):
#xbmc.executebuiltin('Container.SetViewMode(50)')
self.text = kwargs['txt']
self.note = xbmcgui.ControlLabel(x=0, y=0, width=800, height=250, label=self.text)
#self.note= self.getControl(100)
self.addControl(self.note)
and i am calling it as
python:window = d.notify('script-tbd-notification.xml', u.cwd, 'default', '1080i',txt='This is a Test')
window.show()
xbmc.sleep(5000)
window.close()
but using the above code does not work... can someone point me to a working example of window.xmldialog()
the xml file is
xml:<?xml version="1.0" encoding="UTF-8"?>
<window>
<views>50</views>
<controls>
<control type="label" id="100">
<description>testing</description>
<onup>300</onup>
<ondown>200</ondown>
<!-- <onleft>100</onleft> -->
<!-- <onright>100</onright> -->
<width>800</width>
<top>90</top>
<left>60</left>
<height>250</height>
<visible>true</visible>
<align>left</align>
<wrapmultiline>true</wrapmultiline>
<font>font12</font>
<textoffsetx>50</textoffsetx>
<textcolor>FFFFFFFF</textcolor>
<focusedcolor>FFFFFFFF</focusedcolor>
<disabledcolor>80FFFFFF</disabledcolor>
<invalidcolor>FFFFFFFF</invalidcolor>
<label>Not ass cool</label>
</control>
</controls>
</window>