Basic4ppc - Windows Mobile Development  

Go Back   Basic4ppc - Windows Mobile Development > Main Category > Questions & Help Needed
Home Register FAQ Members List Search Today's Posts Mark Forums Read

Questions & Help Needed Post any question regarding Basic4ppc.


How to fix ListBox Items?


Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 02-19-2008, 09:44 PM
Basic4ppc Veteran
 
Join Date: Apr 2007
Posts: 200
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, 10:04 PM
specci48's Avatar
Basic4ppc Expert
 
Join Date: Apr 2007
Location: Germany
Posts: 650
Default

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

I am sorry, of course I mean a combobox....
Reply With Quote
  #4 (permalink)  
Old 02-19-2008, 10:10 PM
RandomCoder's Avatar
Basic4ppc Veteran
 
Join Date: May 2007
Location: UK
Posts: 486
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
__________________
Desktop: Pentium D 920 (2.8GHz, 4MB L2 Cache, 800MHz FSB), 1024MB, 256MB Radeon X600, 250GB HD.
Device : Axim X51v XScale 624MHz, 3.7" VGA, 64MB SDRAM, 256MB Flash ROM + 1Gb SD.

"Defeat never comes to any man until he admits it."Josephus Daniels
Reply With Quote
  #5 (permalink)  
Old 02-19-2008, 10:14 PM
specci48's Avatar
Basic4ppc Expert
 
Join Date: Apr 2007
Location: Germany
Posts: 650
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, 06:56 PM
Basic4ppc Veteran
 
Join Date: Apr 2007
Posts: 200
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, 08:37 PM
RandomCoder's Avatar
Basic4ppc Veteran
 
Join Date: May 2007
Location: UK
Posts: 486
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
__________________
Desktop: Pentium D 920 (2.8GHz, 4MB L2 Cache, 800MHz FSB), 1024MB, 256MB Radeon X600, 250GB HD.
Device : Axim X51v XScale 624MHz, 3.7" VGA, 64MB SDRAM, 256MB Flash ROM + 1Gb SD.

"Defeat never comes to any man until he admits it."Josephus Daniels
Reply With Quote
  #8 (permalink)  
Old 02-20-2008, 09:22 PM
Basic4ppc Veteran
 
Join Date: Apr 2007
Posts: 200
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, 10:26 PM
specci48's Avatar
Basic4ppc Expert
 
Join Date: Apr 2007
Location: Germany
Posts: 650
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, 07:08 AM
Basic4ppc Veteran
 
Join Date: Apr 2007
Posts: 200
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 On
Pingbacks are On
Refbacks are On

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


All times are GMT. The time now is 04:25 AM.


Powered by vBulletin® Version 3.6.12
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.1.0