problem with navigation on the list container items
#1
Hi

I have a problem with navigation on the list container items, when I use the selectItem method I can be able to navigation on the items when I pressing down arrow button of the keyboard, but when I pressing on the up arrow button of the keyboard, nothing will happens that it supposed to be navigation on the items.

Here is the one I use:

Code:
<control type="list" id="4326">
    <description>My first list container</description>
    <posx>12</posx>
    <posy>305</posy>
    <width>350</width>
    <height>271</height>
    <onup>4326</onup>
    <ondown>4326</ondown>
    <pagecontrol>7</pagecontrol>
    <viewtype>list</viewtype>
    <orientation>vertical</orientation>
    <focuseditem>0</focuseditem>

    <itemlayout height="37" width="350">
        <control type="image">
            <posx>0</posx>
            <posy>10</posy>
            <width>350</width>
            <height>34</height>
            <texture>channels_bar1.png</texture>
        </control>
        <control type="label">
            <posx>3</posx>
            <posy>10</posy>
            <width>350</width>
            <height>34</height>
            <font>Font_Bold25</font>
            <aligny>center</aligny>
            <selectedcolor>FF000000</selectedcolor>
            <textcolor>0xFFFFFFFF</textcolor>
            <align>left</align>
            <info>ListItem.Label</info>
        </control>
    </itemlayout>

    <focusedlayout height="37" width="350">
            <control type="image">
                <posx>0</posx>
                <posy>10</posy>
                <width>350</width>
                <height>34</height>
                <visible>!Control.HasFocus(4326)</visible>
                <texture>changelang_yellow.png</texture>
            </control>
            <control type="image">
                <posx>0</posx>
                <posy>10</posy>
                <height>34</height>
                <width>350</width>
                <visible>Control.HasFocus(4326)</visible>
                <texture>changelang_yellow.png</texture>
            </control>
            <control type="label">
                <posx>3</posx>
                <posy>10</posy>
                <width>350</width>
                <height>34</height>
                <font>Font_Bold25</font>
                <aligny>center</aligny>
                <selectedcolor>0xFFFFFFFF</selectedcolor>
                <textcolor>FF000000</textcolor>
                <align>left</align>
                <info>ListItem.Label</info>
            </control>
        </focusedlayout>
    </control>
</control>


It will works fine with the fixedlist, but I don't like the autoscroll.

Do you know how I can navigation on the items when I press on the up and down arrow buttons of the keyboard?
Reply
#2
The onup/ondown (or onleft/onright for horizontal lists) controls in a list are what the list should do when it reaches the ends of the list not what to do while navigating the list itself.
Reply
#3
yeah but the problem is when I press on the down arrow button of the keyboard, it will navigation the list but it will get stuck and it will not navigation the list when I try to press on the up arrow button. There are something is wrong which I am not sure why. Do you know why?

It works fine with wraplist and fixedlist, but I don't like the autoscroll.

How I can block the autoscroll when I use the fixedlist?
Reply
#4
Are you controlling the list from a button?

A little more info might help.
Reply
#5
Yes I'm controlling the list from a button.

I can only navigation the button when I press on the down arrow button as it will not navigation the button when I press on the up arrow button.

Do you know why?
Reply
#6
Can you post the code for the button?
Reply
#7
I don't use the button, but I use the list container that I add the list of items:

Code:
<control type="list" id="4326">
    <description>My first list container</description>
    <posx>12</posx>
    <posy>305</posy>
    <width>350</width>
    <height>271</height>
    <onup>4326</onup>
    <ondown>4326</ondown>
    <pagecontrol>7</pagecontrol>
    <viewtype>list</viewtype>
    <orientation>vertical</orientation>
    <focuseditem>0</focuseditem>

    <itemlayout height="37" width="350">
        <control type="image">
            <posx>0</posx>
            <posy>10</posy>
            <width>350</width>
            <height>34</height>
            <texture>channels_bar1.png</texture>
        </control>
        <control type="label">
            <posx>3</posx>
            <posy>10</posy>
            <width>350</width>
            <height>34</height>
            <font>Font_Bold25</font>
            <aligny>center</aligny>
            <selectedcolor>FF000000</selectedcolor>
            <textcolor>0xFFFFFFFF</textcolor>
            <align>left</align>
            <info>ListItem.Label</info>
        </control>
    </itemlayout>

    <focusedlayout height="37" width="350">
            <control type="image">
                <posx>0</posx>
                <posy>10</posy>
                <width>350</width>
                <height>34</height>
                <visible>!Control.HasFocus(4326)</visible>
                <texture>changelang_yellow.png</texture>
            </control>
            <control type="image">
                <posx>0</posx>
                <posy>10</posy>
                <height>34</height>
                <width>350</width>
                <visible>Control.HasFocus(4326)</visible>
                <texture>changelang_yellow.png</texture>
            </control>
            <control type="label">
                <posx>3</posx>
                <posy>10</posy>
                <width>350</width>
                <height>34</height>
                <font>Font_Bold25</font>
                <aligny>center</aligny>
                <selectedcolor>0xFFFFFFFF</selectedcolor>
                <textcolor>FF000000</textcolor>
                <align>left</align>
                <info>ListItem.Label</info>
            </control>
        </focusedlayout>
    </control>
</control>


For python:

Code:
def __init__(self):

    self.channels_Index = 0
    self.programs_Index = 0


def onAction(self, action):
    if action == ACTION_MOVE_UP:
        if allchannels_enabled:
            if self.channels_Index <= 6:
                #navigation the channels on up
                self.channels_Index -= 1
                self.channels_control = self.getControl(self.channels_List)
                self.channels_control.selectItem(self.channels_Index)


    if action == ACTION_MOVE_DOWN:
        if allchannels_enabled:
            if self.channels_Index <= 5:
                #navigation the channels on down
                self.channels_Index += 1
                self.channels_control = self.getControl(self.channels_List)
                self.channels_control.selectItem(self.channels_Index)
Reply
#8
Sorry, I don't know Python.
Reply

Logout Mark Read Team Forum Stats Members Help
problem with navigation on the list container items0