Help with xbmcgui.ControlButton that images don't display
#1
Hi guys

I need your help, I have got a problem with the buttons. When I adding the buttons in my skin, it will not display the images using focusTexture and noFocusTexture.


It will show like this:

Image



Here is what it supposed to be:

Image



Here is the code:

Code:
def __init__(self):
    self.program_buttons = []
    self.channels_Index = 0
    self.programs_Index = 0


def MyChannels(self, *controlIds):

    #get the programs list
    cur = con.cursor()
    cur.execute('SELECT channel, title, start_date, stop_date FROM programs WHERE channel=? LIMIT 3', [channel])
    programList = list()
    programs = cur.fetchall()
    start_pos = 375    # indent for first program

    for ind, row in enumerate(programs):
        program = row[1].encode('ascii'), str(row[2]), str(row[3])
        title = row[1].encode('ascii')
        program_title = '[B]' + title + '[/B]'
        button_focus = 'channels_yellow.png'
        button_nofocus = 'channels_bar1.png'

        program_controls = xbmcgui.ControlButton(
            int(position_start),
            int(position_top),
            int(program_width),
            int(program_height),
            program_title,
            focusTexture = button_focus,
            noFocusTexture = button_nofocus,
            textColor = text_color,
            focusedColor ='0xFF000000',
        )
        self.program_buttons.append(program_controls)
        self.addControl(program_controls)
    cur.close()


Do you know how I can display the images on the buttons when I add the buttons??
Reply

Logout Mark Read Team Forum Stats Members Help
Help with xbmcgui.ControlButton that images don't display0