Go Back   PCMech Forums > Help & Discussion > Web Design / Development

Need Some Help? Type Your Keywords Here:

Reply
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
Old 10-31-2005, 02:26 PM   #1
Member (9 bit)
 
Join Date: Dec 2004
Location: Michigan
Posts: 421
Send a message via AIM to Turbo91Bird
Visual Basic Question (Scrolling)

I have a list of about 100 items in a combo box on my form. Is there any way I can make the visible list larger when they hit the drop down button to see the items in the list? Right now it must be at some default length but I cannot find a way to make it so the list can be longer so they don't have to scroll through so much stuff in order to see it. Any help would be appreciated.

Also, on a side note. Is there a way to automatically display a certain item in the middle of the list as the first thing that pops up when they focus on that object? Its a item called A0I - Buy Out in the list and I would like it to be the first item displayed but its sorted in order right now and I am not sure how to make it so it displays that "A0I - Buy Out" first since the database I am pulling the data from has it near the middle. Thanks.
__________________
Intel Dual-Core E8400 (E0), Thermalright XP-120, 2x1GB DDR2-1066 G.Skill, ATI X1800XT, SB X-Fi, Logitech Z-5500 5.1, 470W OCZ Powerstream, ASUS P5Q Pro, 500GB Seagate Barracuda, 300GB Seagate (backup), 74GB Raptor HD (old OS)
Turbo91Bird is offline   Reply With Quote
Old 10-31-2005, 02:31 PM   #2
Come in Ray...
 
faulkner132's Avatar
 
Join Date: Sep 2004
Posts: 1,668
Quote:
Originally Posted by Turbo91Bird
I have a list of about 100 items in a combo box on my form. Is there any way I can make the visible list larger when they hit the drop down button to see the items in the list? Right now it must be at some default length but I cannot find a way to make it so the list can be longer so they don't have to scroll through so much stuff in order to see it. Any help would be appreciated.
You can only do this in VB.Net... VB 6 does not support sizing the drop down box.

Quote:
Originally Posted by Turbo91Bird
Also, on a side note. Is there a way to automatically display a certain item in the middle of the list as the first thing that pops up when they focus on that object? Its a item called A0I - Buy Out in the list and I would like it to be the first item displayed but its sorted in order right now and I am not sure how to make it so it displays that "A0I - Buy Out" first since the database I am pulling the data from has it near the middle. Thanks.
You can do this by using MyDropDown.Text = "A0I - Buy Out". This will only work, however if the text "A0I - Buy Out" exists or you have the drop down type set to allow free entry.
faulkner132 is offline   Reply With Quote
Old 10-31-2005, 02:34 PM   #3
Professional gadfly
 
doctorgonzo's Avatar
 
Join Date: Jan 2002
Location: Minneapolis, MN
Posts: 6,364
Send a message via MSN to doctorgonzo
What version of Visual Basic? Is there a ListRows property for the combo box? That's what you would use to determine how many rows to display.

As for automatically displaying a certain value in a combo box, just set the combo box value to that default list item somewhere, like when it gets the focus. You should make sure you aren't overwriting any data that's already there, though.
doctorgonzo is offline   Reply With Quote
Old 10-31-2005, 02:51 PM   #4
~ Ryan ~
 
Join Date: Jun 2005
Location: Jackson TN
Posts: 3,516
Send a message via AIM to rspassey Send a message via MSN to rspassey
or you can do combobox(x).text = "text of object" and it should display that.
__________________
RiotCats.com, an internet domain specifically fabricated and visually erected for the appreciation of the feline kingdom!
rspassey is offline   Reply With Quote
Old 10-31-2005, 08:26 PM   #5
Member (9 bit)
 
Join Date: Dec 2004
Location: Michigan
Posts: 421
Send a message via AIM to Turbo91Bird
Cool! Thanks guys!
Turbo91Bird is offline   Reply With Quote
Reply

Bookmarks

Still Need Help? Type Your Keywords Here:


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

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

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



All times are GMT -5. The time now is 04:59 AM.
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2012, vBulletin Solutions, Inc.
SEO by vBSEO 3.6.0 PL2