DEVBUZZ Homepage Drop down and drop out.
 
Web www.devbuzz.com
  HOME PAGE
  All Articles
  Advertise
  Consulting

 Development
  Discuss - Forums
  Still in the box?
  .Compact Framework
  Code Snippets
  SQL Server CE
  Database
  MS Resources
 Stores
  Developer Controls
  Pocket PC Hardware
  Pocket PC Software
  Pocket PC Books
  .NET CF Books
  Book Reviews
  SPB SW Discounts
  RESCO SW Discounts
 DEVBUZZ Info
  About Us
  Help
  Join our email list
  Links & Ratings
  Press & Comments
  Pocket PC version
  Software Reviews
  Hardware Reviews
 Authors
  Authors
  Article Guide
  Competitions
 Resources
  Developers
  Register
  Login

  SPB Discounts!
 Columnists
  Rick Winscot
 Past Blast
  Personal Media Ctr
  Gizmobility
  eVB Legacy
  Old news
  Hosted Software
  Wireless
  Newsletters
  Carl Davis
  Upton Au

 Pocket PC Registry
  Join the registry
  View current list
 Current Poll
Are you converting to .NET Compact Framework?
Yes, it has changed my life!
No, I'm sticking with eVB
.NET CF what's that`?

Current results
3431 votes so far
 Recent Forum Threads [goto forums]

Get Computername
read... (67 hits)


Great aid to development productivity
read... (82 hits)


ThreadingTimer sample code
read... (143 hits)


Multithreading with .NET CF
read... (194 hits)


Moving from eMbedded Visual Basic to Visual Basic .NET
read... (166 hits)


.NET Compact Framework 2.0 Service Pack 2
read... (226 hits)


Transfer Data from SQL Server 2000 to SQL Server Compact Edition
read... (298 hits)


This protocol version is not supported
read... (236 hits)


Converting Lowercase to uppercase wont work
read... (203 hits)


Direct access to MS SQL Server 2000
read... (374 hits)


Creating SDF file in Desktop
read... (513 hits)


Winsock in CF.NET
read... (316 hits)


Using Pocket Outlook to submit HTML page form with MAILTO action
read... (420 hits)


Missing file "System.Data.PocketPC.asmmeta.dll"
read... (268 hits)


HP iPAQ hw6915 Serial Port Issue
read... (309 hits)


Info on the recent forum changes
read... (341 hits)


SqlServer tools from Redgate
read... (383 hits)


Arrow keys and Hardware navigation button
read... (393 hits)


O2 XDA lls pin sync cable to comport
read... (322 hits)


Creating dynamic folders on Pocket PC OS
read... (299 hits)

Custom Windows Mobile software development.
LBS Challenge 2007
LBS Challenge Eight previous NAVTEQ Global LBS Challenge® participants have received venture capital funding and nine past LBS Challenge winners have launched commercial applications on major wireless carriers. Register your non-commercial LBS application in the 2007 NAVTEQ Global LBS Challenge in one of three regions: Americas, Europe-Middle East-Africa (EMEA) or Asia-Pacific(APAC). You could win a share of $2 million in prizes. This could be your year.
Dream. Develop. Win.

The Pocket Commando by Carl Davis | Back

Drop down and drop out.
Written by Carl Davis  [author's bio]  [read 39804 times]
Edited by Derek

Download the code   Discuss this article   eVB Ver 3.0   

Page 1  Page 2 

This time I decided to take a break from Windows CE certification to look at something fun I discovered while updating one of my applications. I hope everyone has at least taken a quick peak at the Veritest website to find out how to get certified.

Watch Those Combo Boxes…

You might have noticed that it has been a few months without a report. Well, I've been working hard on a new version of one of my applications (and eating turkey, shopping for Christmas presents, etc…). I ran into a challenge and realized that, once again, I need to improve a old standard user interface to make it easier to use on the PocketPC.

Have you ever seen an application that used combo boxes with too many elements? You may be asking, "What is he getting at?" I mean applications where there are dozens of items that appear in a combo box. For example, have you ever have an application that includes a list of all 50 states? A combo box is literally a drag (or at least a scroll) to use. You need to scroll and scroll to find the right item. How many times have you accidentally tapped "off" the scroll bar only to have the wrong selection and need to start over? Programmers use combo boxes to save some real estate on the screen and they are great for short lists of items. However, we need to make it easier for our users when the list is longer. Who wants to scroll forever to get to the one element you need? You can see an example of what I'm talking about in Figure 1. This shows one of Microsoft's setup programs with a very long combo box containing all the possible locales you can select.


Figure 1

By now, you probably realize that I don't bring up a problem without at least contemplating a solution. In most programs on a desktop a user can jump quickly in a combo box by typing a character. This doesn't work on the Pocket PC but I wanted to provide users a way of "jumping" down a list of selections to minimize the amount of scrolling needed. The PocketPC already has a program that offers the same capabilities: Contacts. A user can quickly jump between sections of their contact list by tapping a command button with a set of three letters. I'll use this as a template to my own replacement for a combo box.

Building the Dialog…

Figure 2 shows the interface for my new control. The screen is fairly simple; it consists of a row of buttons with three letters on each (identical to the contacts application), a done button to accept our choice, and a cancel to ignore our choice.


Figure 2

The application I'm writing is related to role-playing games (what else!) and I need to be able to select from lists items like spells and weapons. These may change over time (as the user's game master creates new ones or new supplements come out) and I could not hard code the items I would add to selection lists. Thus, the control I created uses a text file to define the items the user can select from. An example is shown in Listing 1. The first element on a line is the key, or name, to display in the list. Addition information is stored in a colon-separated list. This is the example I will use to demonstrate this technique. The file is called Students.def.

Able:Chicago:312-555-1222:Loves Cats
Adam:Milwaukee:214-555-1211:Lives at home
Alex:Sleepy Hollow:847-555-3456:Enjoys Snowball fights!
Carl:West Dundee:847-555-1000:Loves computers, super Geek!
Carla:Michigan:None:Carl's Sister.
Chandler:Arizona:555-555-5555:It is hot!
Elizabeth:City:555-555-4000:Couldn't think of anything.
Freddy:North Carolina:454-555-4545:None
George:Test:555-555-5555:None
Jennifer:Test:555-555-5555:None
Jessica:Test:555-555-5555:None
Jimmy:Test:555-555-5555:None
Kathy:Test:555-555-5555:None
Liz:Test:555-555-5555:None
Manuel:Test:555-555-5555:None
Morgan:Test:555-555-5555:None
Nicole:Test:555-555-5555:None
Paul:Test:555-555-5555:None
Roger:Test:555-555-5555:None
Sam:Test:555-555-5555:None
Terry:Test:555-555-5555:None
Tim:Test:555-555-5555:None
Tom:Test:555-555-5555:None
William:Test:555-555-5555:None
Woodberry:Test:555-555-5555:None
X Man:Test:555-555-5555:None
Zack:Test:555-555-5555:None

Listing 1

Next Page 

Back to the Pocket Commando | [Article Index]

 

Back to the top of the page.
Chris De Herrera's Windows CE Website Windows CE News & Information Source
Copyright ©2000-2007 by DEVBUZZ.COM, Inc., NJ. USA.MSDEVELOP