problem with navigation on the list container items - Pr0ph3cyTiger - 2014-11-29
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?
RE: problem with navigation on the list container items - Hitcher - 2014-11-29
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.
RE: problem with navigation on the list container items - Pr0ph3cyTiger - 2014-11-29
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?
RE: problem with navigation on the list container items - Hitcher - 2014-12-03
Are you controlling the list from a button?
A little more info might help.
RE: problem with navigation on the list container items - Pr0ph3cyTiger - 2014-12-06
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?
RE: problem with navigation on the list container items - Hitcher - 2014-12-06
Can you post the code for the button?
RE: problem with navigation on the list container items - Pr0ph3cyTiger - 2014-12-07
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)
RE: problem with navigation on the list container items - Hitcher - 2014-12-09
Sorry, I don't know Python.
|