?
Solved

J2ME: List SelectedIndex Changed Event

Posted on 2004-11-12
9
Medium Priority
?
981 Views
Last Modified: 2008-02-01
Is there any function that detects highlight changes in a List item in a MIDLet class.?
The functions provided with List allow only detect if an index has been selected AFTER the select button was pressed.
I need a function that detects the change of selection when UP DOWN arrows are pressed. This function should return the index of the selected item in a List as soon as the item is highlighted not after the select button is pressed.
Any Help??
0
Comment
Question by:mte01
9 Comments
 
LVL 48

Expert Comment

by:Mikal613
ID: 12565493
did you look at the mousedown event? or perhaps the click event
0
 
LVL 3

Author Comment

by:mte01
ID: 12567926
There's no mouse :)........it's a mobile phone enviroment.......

We're looking at some "itemup" or "itemdown" event......
0
 
LVL 13

Assisted Solution

by:petmagdy
petmagdy earned 500 total points
ID: 12567965
for sorry their is no such event in List class
0
 The Evil-ution of Network Security Threats

What are the hacks that forever changed the security industry? To answer that question, we created an exciting new eBook that takes you on a trip through hacking history. It explores the top hacks from the 80s to 2010s, why they mattered, and how the security industry responded.

 
LVL 3

Author Comment

by:mte01
ID: 12568023
petmagdy......I see...I will be waiting for other comments
0
 
LVL 4

Expert Comment

by:bhpr
ID: 12581685
mte01 ,

try someting like this

if keyPressed in (uparrow| downarrow) then
   list.getSelectedIndex()
endif

??
-bhpr
0
 
LVL 3

Author Comment

by:mte01
ID: 12581692
bhpr......have you worked in J2ME before,....I don't think such syntax would work. (I would have tried it right now, but I am working on a pc that doesn't have the J2ME software)
0
 
LVL 4

Accepted Solution

by:
bhpr earned 500 total points
ID: 12582132
mte01 thanks :) for your comment,  i worked in J2ME, and that is a not the actual code, that is only i written for  a overview (pheudo code).

keyPressed is a method in Canvas class.



-bhpr
0
 
LVL 3

Author Comment

by:mte01
ID: 12591608
Yes....I was trying to be able to do this without using the Canvas class....
0
 
LVL 3

Author Comment

by:mte01
ID: 12627636
I tried everything possible....apparently it won't work....does anyone think that re-posting the question in the Java area would make a difference??
0

Featured Post

 The Evil-ution of Network Security Threats

What are the hacks that forever changed the security industry? To answer that question, we created an exciting new eBook that takes you on a trip through hacking history. It explores the top hacks from the 80s to 2010s, why they mattered, and how the security industry responded.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

With the purchase of CloudCommand by Comcast customers are left in a bind as subscriptions expire and render the AP's disabled. The following will explain how to flash your Ubiquiti AP's with CloudCommand firmware back to Ubiquiti firmware. HOWTO…
This program is used to assist in finding and resolving common problems with wireless connections.
This Micro Tutorial will show you how to maximize your wireless card to its maximum capability. This will be demonstrated using Intel(R) Centrino(R) Wireless-N 2230 wireless card on Windows 8 operating system.
Viewers will learn how to connect to a wireless network using the network security key. They will also learn how to access the IP address and DNS server for connections that must be done manually. After setting up a router, find the network security…
Suggested Courses
Course of the Month16 days, 13 hours left to enroll

864 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question