PDA

View Full Version : ControlList onchange?


Basje
2007-03-28, 14:10
Hi there,

Is there some sort of method like an onChange methode for a ControlList? I want some function to be executed when I am traversing a ContrilList (scrolling through, but not selecting) but I cannot get it to work at the moment.

Perhaps the solution is very straight forward, but my knowledge on scripting is still on NOOB level (but increasing)

chunk_1970
2007-03-28, 14:39
Here an example of code you can use in your onAction() function..which I think is what your looking for..


if self.getFocus() == self.mylistcontrol :
tlab1 = self.mylistcontrol.getSelectedItem().getLabel()
tlab2 = self.mylistcontrol.getSelectedItem().getLabel2()
tnum = self.mylistcontrol.getSelectedPosition()
if self.LastId != tnum:
self.LastId == tnum
## New record in list selected...
else :
self.LastId = -1

Basje
2007-03-28, 20:59
Thanks for the help. I solved the problem. The result (if you are interested) can be downloaded here:
http://www.rieter.net/uitzendinggemist/index.php

It's Dutch Uitzendinggemist Streaming script.

stanley87
2007-03-29, 01:16
or you do an Anaction for Up and Down button presses, then see if list has focus, and if so then update text box or whatever it is.