Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Visual Basic > VB.NET 1.0 > VB.NET 2002/2003 Basics
|
VB.NET 2002/2003 Basics For coders who are new to Visual Basic, working in .NET versions 2002 or 2003 (1.0 and 1.1).
Welcome to the p2p.wrox.com Forums.

You are currently viewing the VB.NET 2002/2003 Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old December 9th, 2004, 05:24 AM
Authorized User
 
Join Date: Sep 2004
Posts: 57
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to Brettvan1
Default Displaying listbox values.....???

Hi there,

I am having trouble displaying the values in my listboxes. I have 5 textboxes and two listboxes on my form. I can display the numbers in the trextboxes using return textbo1.text & textbox2.text etc...etc.. Now for my two listboxes I am using return listbox1.selectedValue which does not work unless I actually highlight the value on my form which I dont want to do.I just want to use the scroll bars select my desired number and go on from there.

Could anyone please help me with this ??

Thanks for you time
B

 
Old December 9th, 2004, 10:35 AM
Friend of Wrox
 
Join Date: Feb 2004
Posts: 177
Thanks: 0
Thanked 0 Times in 0 Posts
Default

You programmaticaly select the list value, so that you will get the value.

It is not how much we do,
but how much love we put in the doing.

-Mother Theresa
 
Old December 10th, 2004, 05:09 AM
Authorized User
 
Join Date: Sep 2004
Posts: 57
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to Brettvan1
Default

Huh ?

 
Old December 10th, 2004, 09:52 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 540
Thanks: 0
Thanked 4 Times in 4 Posts
Default

Brett,

I am a little confused. Do you want to pull the item's text from the list box or it's index, or do you want to set it to a value within the listbox?

J
 
Old December 13th, 2004, 06:42 PM
Authorized User
 
Join Date: Oct 2003
Posts: 41
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I think I can see what you are trying to do.

You are using the listbox control, reduced in height so only one item is visible at any one time. By clicking the scrolls, you can search through the items in the collection, bringing one 'to the top'. But, I don't think you can programmatically work out which item is 'on top'.

Try using the domainupdown control instead. This will work. The selected item is by default, the item that is scrolled to.

I hope that make sense.






Similar Threads
Thread Thread Starter Forum Replies Last Post
Displaying Table Column/Fields names in a listbox Durkee VB.NET 2002/2003 Basics 4 September 25th, 2007 03:37 PM
multiple Listbox values in another listbox terryv Excel VBA 0 June 27th, 2007 07:01 AM
displaying files in a listbox mh Classic ASP Basics 2 April 11th, 2005 09:55 AM
Values from a ListBox mrideout BOOK: Beginning ASP.NET 1.0 0 December 1st, 2004 09:53 AM
Getting Values From ListBox DARSIN General .NET 2 October 1st, 2004 02:32 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.