Download the free trial version
Basic4android Video
Features
Tutorials and manuals
Showcase
Screenshots

Go Back   Android Development Forum - Basic4android > Basic4ppc (Windows Mobile) > Questions (Windows Mobile)
Documentation Wiki Register Members List B4P Search Today's Posts Mark Forums Read

Questions (Windows Mobile) Post any question regarding Basic4ppc.

How to fix ListBox Items?

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 02-19-2008, 08:44 PM
Basic4ppc Veteran
 
Join Date: Apr 2007
Posts: 269
Default How to fix ListBox Items?

Hi,

Maybe a stupid question but if I want the user NOT to be able to change the items of the listbox, just to choose them, how do I do that?
Thnx
Marc
Reply With Quote
  #2 (permalink)  
Old 02-19-2008, 09:04 PM
specci48's Avatar
Basic4ppc Expert
 
Join Date: Apr 2007
Location: Germany
Posts: 1,057
Awards Showcase
Beta Tester Forum Contributer 
Total Awards: 2
Default

Do you really think of a listbox or of a combobox?
Reply With Quote
  #3 (permalink)  
Old 02-19-2008, 09:09 PM
Basic4ppc Veteran
 
Join Date: Apr 2007
Posts: 269
Default

I am sorry, of course I mean a combobox....
Reply With Quote
  #4 (permalink)  
Old 02-19-2008, 09:10 PM
RandomCoder's Avatar
Basic4ppc Expert
 
Join Date: May 2007
Location: Derbyshire, UK
Posts: 623
Awards Showcase
Beta Tester 
Total Awards: 1
Default

Neither the ComboBox or ListBox allow the user to directly change values.
If you did want the user to be able to enter values then you would need to provide a method such as a text box and button to trigger an event that would add the text to the list.

Regards,
RandomCoder
__________________
"Defeat never comes to any man until he admits it."Josephus Daniels
Reply With Quote
  #5 (permalink)  
Old 02-19-2008, 09:14 PM
specci48's Avatar
Basic4ppc Expert
 
Join Date: Apr 2007
Location: Germany
Posts: 1,057
Awards Showcase
Beta Tester Forum Contributer 
Total Awards: 2
Default

If you are coding something for the device you should remember that a combobox isn't editable on the device due to small differences in the .Net CF.

Or is it a desktop program...?


specci48
Reply With Quote
  #6 (permalink)  
Old 02-20-2008, 05:56 PM
Basic4ppc Veteran
 
Join Date: Apr 2007
Posts: 269
Default

It is essentially a PPC program. I want to get rid of the blue background of the item as well.
Reply With Quote
  #7 (permalink)  
Old 02-20-2008, 07:37 PM
RandomCoder's Avatar
Basic4ppc Expert
 
Join Date: May 2007
Location: Derbyshire, UK
Posts: 623
Awards Showcase
Beta Tester 
Total Awards: 1
Default

I think that you would be better placing a label over the ComboBox that mirrors the ComboBox value.

Regards,
RandomCoder
__________________
"Defeat never comes to any man until he admits it."Josephus Daniels
Reply With Quote
  #8 (permalink)  
Old 02-20-2008, 08:22 PM
Basic4ppc Veteran
 
Join Date: Apr 2007
Posts: 269
Default

I think I didnot express myself clear enough.

I want to:
1. let the user choose from the items in the combobox
2. NOT let him change any values in the box
3. get rid of the blue colour in the box when an item is chosen

I cannot disable the box or put a label over it because then I cannot choose an item.

marc
Reply With Quote
  #9 (permalink)  
Old 02-20-2008, 09:26 PM
specci48's Avatar
Basic4ppc Expert
 
Join Date: Apr 2007
Location: Germany
Posts: 1,057
Awards Showcase
Beta Tester Forum Contributer 
Total Awards: 2
Default

As far as I can see:

1. That's what a combobox is designed for... => solved
2. If you run your application on a device, the entries can NOT be edited => solved
3. The selected entry is hilited as long as the focus remains to the combobox control. My (simple) suggestion: Move the actual focus to any other control within the selction_changed event:
Code:
Sub ComboBox1_SelectionChanged (Index, Value)
    
' any control except the combobox will do
    button1.Focus
End Sub
This works as long as the user did not "tap" the combobox without changing the actual selection. => perhaps (partly) solved


specci48
Reply With Quote
  #10 (permalink)  
Old 02-21-2008, 06:08 AM
Basic4ppc Veteran
 
Join Date: Apr 2007
Posts: 269
Default

Yes, I think you are right. I will use that solution. Thank as always for your help!
Marc
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Listbox and enter key tsteward Questions (Windows Mobile) 2 10-14-2008 06:30 AM
Seleccionar Items Listbox jorge perez sabio Spanish Forum 2 03-25-2008 11:50 AM
Lookup Contacts using a listbox thartung Questions (Windows Mobile) 9 02-27-2008 09:16 AM
Listbox difficulties. dan kabestan Questions (Windows Mobile) 2 12-15-2007 06:24 PM
listbox = arraylist ? sloopa Questions (Windows Mobile) 1 05-07-2007 12:38 PM


All times are GMT. The time now is 07:01 AM.


Powered by vBulletin® Version 3.6.12
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0