![]() |
|
|||||||
| Home | Register | FAQ | Members List | Search | Today's Posts | Mark Forums Read |
| Questions & Help Needed Post any question regarding Basic4ppc. |
![]() |
|
|
LinkBack | Thread Tools | Display Modes |
|
||||
|
I was under the impression that the combobox is read-only?
See this post... ComboBox text input 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 |
|
||||
|
Yes but it is a bit messy as you can type into the ComboBox and doing so resets SelectedIndex.
However (he said with an appropriate flourish!) with my ControlEvents library ControlEvents library and an undocumented Text property of the ComboBox Code:
Sub Globals
'Declare the global variables here.
CB1index = -1
End Sub
Sub App_Start
Form1.Show
CbEvents.New1("ComboBox1")
End Sub
Sub ComboBox1_SelectionChanged(I, v)
CB1index = ComboBox1.SelectedIndex
End Sub
Sub CbEvents_TextChanged
If CB1Index >= 0 Then ' AND ComboBox1.SelectedIndex = -1 Then
' the user has typed into a selection and so unset SelectedIndex so reset it
ComboBox1.SelectedIndex = CB1index
ComboBox1.Text = ComboBox1.Item(ComboBox1.SelectedIndex)
Else
' the useR is trying to type into the empty combobox - don't let him!
ComboBox1.Text = ""
End If
End Sub
|
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Textbox Readonly | IansResearch | Questions & Help Needed | 12 | 12-22-2008 04:12 PM |
| ComboBox | ceaser | Questions & Help Needed | 2 | 08-25-2008 04:52 PM |
| ComboBox | Raytracer | Italian Forum | 3 | 04-15-2008 05:15 PM |
| Textbox with ReadOnly,IgnoreKey,TextAlignment | Filippo | Basic4ppc Wishlist | 0 | 11-17-2007 09:23 PM |
| Readonly property in the Textbox control | bidibulle | Basic4ppc Wishlist | 14 | 11-16-2007 09:19 AM |