2015-05-14, 19:50
When I try the code bellow from the HOW TO example on the wiki it runs but a "working" message keeps showing until you hit esc/back.
Is there a way of not showing that?
Is there a way of not showing that?
Code:
import xbmc, xbmcgui
#get actioncodes from https://github.com/xbmc/xbmc/blob/master/xbmc/guilib/Key.h
ACTION_PREVIOUS_MENU = 10
ACTION_SELECT_ITEM = 7
ACTION_PARENT_DIR = 9
class MyClass(xbmcgui.Window):
def __init__(self):
self.strActionInfo = xbmcgui.ControlLabel(100, 120, 200, 200, '', 'font13', '0xFFFF00FF')
self.addControl(self.strActionInfo)
self.strActionInfo.setLabel('Push BACK to quit, A to display text and B to erase it')
def onAction(self, action):
if action == ACTION_PREVIOUS_MENU:
self.close()
if action == ACTION_SELECT_ITEM:
self.strAction = xbmcgui.ControlLabel(300, 200, 200, 200, '', 'font14', '0xFF00FF00')
self.addControl(self.strAction)
self.strAction.setLabel('Hello world')
if action == ACTION_PARENT_DIR:
self.removeControl(self.strAction)
mydisplay = MyClass()
mydisplay .doModal()
del mydisplay