473,396 Members | 1,671 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

selecting a list element...

42
hi all,
can any one suggest me on selcting a list element?

i am displaying a list containing some items dynamically...
after displaying the content and the form holding this list, i need to select elements by pressing up/down button on the mobile phone...

at times by default i'm able to select items by clicking on the up/down buttons...
but i need a reliable solution for this...
can any one help me...

i'm using c#.net, the project is for windows mobile...
Nov 21 '08 #1
1 2619
markmcgookin
648 Expert 512MB
The selected index of the item is what you need... so something like

Expand|Select|Wrap|Line Numbers
  1. this.myListBox.selectedIndex = 1;
  2.  
this may be selectedItem, items.selectedItemIndex or something similar, this is just off the top of my head

then on your buttons
Expand|Select|Wrap|Line Numbers
  1. this.myListBox.selected index = this.myListBox.SelectedIndex + 1;
  2.  
and for down

Expand|Select|Wrap|Line Numbers
  1. this.myListBox.selected index = this.myListBox.SelectedIndex - 1;
  2.  
Nov 25 '08 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

5
by: Joe Six-Pack | last post by:
Hi, Im having problems in randomly selecting an element in an array that has not been selected before.. in other words, I have an array of answers to questions, then I want to select 5, with one...
5
by: Tristan Miller | last post by:
Greetings. I have an XML file listing various information about text glyphs (Unicode value, HTML entity name, SGML entity name, etc.). All glyphs have a Unicode value, but not all of them have...
1
by: don | last post by:
Ref Dvd Title Location ---------------------------------------- 62 Pilates; Austin Binder 1 63 Yoga; Kripalu Binder 1 64 Yoga; Workout ...
1
by: newcomer | last post by:
I have a javascript index that is similar to the one in the Windows help. It has a text field that allows the you to type text and it finds the closest item in the list below the text field. The...
3
by: james.dixon | last post by:
Hi I was wondering if anyone else had had this problem before (can't find anything on the web about it). I have three select elements (list boxes - from here on I'll refer to them as 'the...
2
by: areef.islam | last post by:
Hi, I am kinda new to javascript and I am having this problem with selecting multiple options from a select tag. Hope someone can help me out here. here is my code...
1
by: jdhcards | last post by:
Hello, I've been banging my head against a problem all day without a solution, and I'm hoping you all can help. I've got a piece of XML that defines a set of elements in a flat list. Each of...
9
by: Generic Usenet Account | last post by:
I had a need to randomly select an element from an STL collection. It does not appear that this functionality is provided out-of-the-box with STL. Here is my crude implementation. I am using...
10
by: AZRebelCowgirl73 | last post by:
This is what I have so far: My program! import java.util.*; import java.lang.*; import java.io.*; import ch06.lists.*; public class UIandDB {
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.