Hide button in DialogProgress
#1
Hello,

I want the button "Cancel" temporarily hide from "DialogProgress.xml". How can I do this?

Thank you
Reply
#2
hi,
not sure is good idea...
but test this
PHP Code:
# get window progress
WINDOW_PROGRESS xbmcgui.Window10101 )
# give window time to initialize
xbmc.sleep100 )
# get our cancel button
CANCEL_BUTTON WINDOW_PROGRESS.getControl10 )
# desable button (bool - True=enabled / False=disabled.)
CANCEL_BUTTON.setEnabledFalse )
#your code here
[...]
# enable button
CANCEL_BUTTON.setEnabledTrue 
frost
For my bad English, sorry. I am French Canadian.
Admin @ Passion-XBMC.org
Reply
#3
unfortunately does not work
PHP Code:
ERRORError ContentsNon-Existent Control 10 

Edit:

I can use a modified copy of DialogProgress.xml (possibly DialogProgressLigth.xml)? if so, how?
Reply
#4
Smile Are you created dialog progress before!

I tested and work for me

PHP Code:
import time

import xbmc
import xbmcgui

DIALOG_PROGRESS 
xbmcgui.DialogProgress()
DIALOG_PROGRESS.create"Custom Progress""Desabled cancel button..." )

# get window progress
WINDOW_PROGRESS xbmcgui.Window10101 )
# give window time to initialize
xbmc.sleep100 )
# get our cancel button
CANCEL_BUTTON WINDOW_PROGRESS.getControl10 )
# desable button (bool - True=enabled / False=disabled.)
CANCEL_BUTTON.setEnabledFalse )

#your code here
for i in range):
    
DIALOG_PROGRESS.update0"Enable cancel button in %i second..." % ( 5-) )
    
time.sleep)

# enable button
CANCEL_BUTTON.setEnabledTrue )

DIALOG_PROGRESS.close() 

frost
For my bad English, sorry. I am French Canadian.
Admin @ Passion-XBMC.org
Reply
#5
How it works, Thanks
Reply

Logout Mark Read Team Forum Stats Members Help
Hide button in DialogProgress1