|
-
Jan 3rd, 2010, 08:05 AM
#1
Thread Starter
Lively Member
Question about the ComboBox
Hello All!
How can I create a ComboBox that it got only the below values:
OFF
-10
-15
-20
-25
-30
-35
-40
-45
And the user cant enter another value.
Thanks !
Y
-
Jan 3rd, 2010, 08:09 AM
#2
Re: Question about the ComboBox
Code:
Private Sub Form_Load()
Combo1.AddItem "item1"
Combo1.AddItem "item2"
Combo1.AddItem "item3"
'etc...
End Sub
By setting the Combox's Style property to Dropdownlist, it will allow users to only select the item...
If my post was helpful to you, then express your gratitude using Rate this Post. 
And if your problem is SOLVED, then please Mark the Thread as RESOLVED (see it in action - video)
My system: AMD FX 6100, Gigabyte Motherboard, 8 GB Crossair Vengance, Cooler Master 450W Thunder PSU, 1.4 TB HDD, 18.5" TFT(Wide), Antec V1 Cabinet
Social Group: VBForums - Developers from India
Skills: PHP, MySQL, jQuery, VB.Net, Photoshop, CodeIgniter, Bootstrap,...
-
Jan 3rd, 2010, 08:12 AM
#3
Thread Starter
Lively Member
Re: Question about the ComboBox
Thanks!
But still the user can type a value that he wants...
Can I disable the option to write in the ComboBox?
Thanks Again!
Y
-
Jan 3rd, 2010, 08:18 AM
#4
Re: Question about the ComboBox
Can I disable the option to write in the ComboBox?
By setting the Combox's Style property to Dropdownlist
If my post was helpful to you, then express your gratitude using Rate this Post. 
And if your problem is SOLVED, then please Mark the Thread as RESOLVED (see it in action - video)
My system: AMD FX 6100, Gigabyte Motherboard, 8 GB Crossair Vengance, Cooler Master 450W Thunder PSU, 1.4 TB HDD, 18.5" TFT(Wide), Antec V1 Cabinet
Social Group: VBForums - Developers from India
Skills: PHP, MySQL, jQuery, VB.Net, Photoshop, CodeIgniter, Bootstrap,...
-
Jan 4th, 2010, 07:31 AM
#5
Re: Question about the ComboBox
And, even if the user types something different it will not be made a member of the combo box unless you, the programmer, add it through code.
-
Jan 5th, 2010, 04:33 AM
#6
Thread Starter
Lively Member
Re: Question about the ComboBox
Thanks!
Another question,
How can I make that the first item in the list will appear at running?
Thanks!
Y
-
Jan 5th, 2010, 05:11 AM
#7
Hyperactive Member
Re: Question about the ComboBox
 Originally Posted by li9erYol
Thanks!
Another question,
How can I make that the first item in the list will appear at running?
Thanks!
Y
Combo1.ListIndex = 0
"More Heads are Better than One"
-
Jan 5th, 2010, 08:23 AM
#8
Thread Starter
Lively Member
Re: Question about the ComboBox
Thanks!
And how can I make that the second item in the list will appear at running?
-
Jan 5th, 2010, 08:26 AM
#9
Hyperactive Member
Re: Question about the ComboBox
 Originally Posted by li9erYol
Thanks!
And how can I make that the second item in the list will appear at running?
Combo1.ListIndex = 1
"More Heads are Better than One"
-
Jan 5th, 2010, 08:27 AM
#10
Re: Question about the ComboBox
Code:
Combo1.ListIndex = 1
If my post was helpful to you, then express your gratitude using Rate this Post. 
And if your problem is SOLVED, then please Mark the Thread as RESOLVED (see it in action - video)
My system: AMD FX 6100, Gigabyte Motherboard, 8 GB Crossair Vengance, Cooler Master 450W Thunder PSU, 1.4 TB HDD, 18.5" TFT(Wide), Antec V1 Cabinet
Social Group: VBForums - Developers from India
Skills: PHP, MySQL, jQuery, VB.Net, Photoshop, CodeIgniter, Bootstrap,...
-
Jan 5th, 2010, 08:49 AM
#11
Thread Starter
Lively Member
Re: Question about the ComboBox
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|