473,408 Members | 1,738 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,408 software developers and data experts.

Working with List Boxes

I have a quick question about wrking List Boxes,
How do you "Add" or "Subtract" the items in a list box to output to a a text box??

For an example, you input the numbers 10 and 5, how do you add them together then output the solution to a text box??
Nov 16 '07 #1
3 1009
Shashi Sadasivan
1,435 Expert 1GB
I have a quick question about wrking List Boxes,
How do you "Add" or "Subtract" the items in a list box to output to a a text box??

For an example, you input the numbers 10 and 5, how do you add them together then output the solution to a text box??
Can you access the selectedItem?
read it as a string, and convert it to your datatype (int, float, etc) and then do the needful to post it to the textbox
Nov 16 '07 #2
kunal pawar
297 100+
Convert selected Item in Perticular DataType and then do operation as per ur requirement. U can used Select Case for tht
Nov 16 '07 #3
Frinavale
9,735 Expert Mod 8TB
Can you access the selectedItem?
read it as a string, and convert it to your datatype (int, float, etc) and then do the needful to post it to the textbox
Shashi 's right here.
In your add or subtract buttons' click events (I'm assuming your using buttons) you need to grab the selected value of the each listview, be sure to cast or parse these values into the correct data type, the perform the add or subtract, then set the textboxes text value to this resulting value (toString of course)
Nov 16 '07 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: Dwayne Gaddy | last post by:
Hey all, I have a windows form with a list boxes. I have data bound the list boxes with data from my sql database. I want to use drag and drop to allow users to choose different options from the...
1
by: tim | last post by:
Is there like an easy way to make file boxes? You know the type, kinda like a file explorer where I can select a file for processing? In visual basic it was simple with the file list boxes, and the...
8
by: Galina | last post by:
Hello I have 6 dependent list boxes on my ASP page:  Faculty;  Lecturer;  Course;  Course occurrence;  Group;  Week commencing date. When faculty is selected, lists of lecturers and...
2
by: Yoshitha | last post by:
hi I have 2 drop down lists in my application.1st list ontains itmes like java,jsp,swings,vb.net etc.2nd list contains percentage i.e it conatains the items like 50,60,70,80,90,100. i will...
3
by: sewerized | last post by:
Hello all, I'm having a problem with a user preferences form I'm creating. I want to use dynamic dropdown SELECT boxes for this so my page doesn't get cluttered with 100000 links. Since I...
7
by: ljungers | last post by:
Have Form-1 with 3 text boxes and 1 command button. With any of the 3 boxes filled out and button is clicked, a Macro is performed that Opens a Query that has a WHERE clause that uses the 3 test...
3
by: ljungers | last post by:
Have a couple of conditions going on that I can't seem to get working correctly. Have 1 Form only with 3 text boxes that are used in a query, when a command button is clicked using 'Event...
4
Rabbit
by: Rabbit | last post by:
Cascading Combo/List Boxes This tutorial is to guide you in the creation of Cascading combo/list boxes. That is when you have multiple combo/list boxes where the selection of an option in one...
3
by: rudeman76 | last post by:
Hello, I am working on an incident form. I have 4 set text boxes and up to 4 drop-down boxes on the form. The user enters in the date then time. I have 4 option buttons for the user to select...
2
by: =?Utf-8?B?UGF1bA==?= | last post by:
Hi I have a menu contol on a master page and some dropdown boxes and text boxes on another page that gets loaded into the place holder of the master page. The dropdown menu on the master page...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.