|
-
Jan 2nd, 2004, 01:37 PM
#1
Thread Starter
Member
very newbie question, with numeric up/down
hey, well i want the value of the numericupdown (extracost) to be "1.50" so i did
im using this in conjunction with a listbox so if a item in the listbox is 3 it will add the ext to the total to make it 4.50 if the numeric box is set to 1 and if set to 2 then 6.. and so onn..
well my problem is that when i click up on the numericupdown tool it goes straight to 2, it doesnt come up with one.. so how do i get around this :/
cheers
so wat i want to no is how to make the numericupdown box show 1 and the value of 1 = 1.5 so on (2 = 3.0, 3 = 4.5) so on
-
Jan 2nd, 2004, 02:43 PM
#2
Frenzied Member
set decimal places property to 2
-
Jan 2nd, 2004, 02:44 PM
#3
Thread Starter
Member
cheerz
its not exactly wat i wanted to do
VB Code:
ext1.Value = 1.5
txtext.Text = Convert.ToDouble(BVAT.Text + ext1.Value)
that the code i got for a button
when the numeric up and down is pressed i want it to go up like
1 - 2 - 3 - 4 - 5 - 6 so on
but i want the value of 1 to b "£1.50" and the value of 2 to be " £3.00" but still show the 1 - 2 - 3 so on :/ all the 2 decimal places does is make it show the value :/ cheers for that i can use that 2 but main priority is wat is written above.. sorry my first example didnt clear it up
thank you anyway highly apprciated
Last edited by Ezpz; Jan 2nd, 2004 at 02:50 PM.
-
Jan 3rd, 2004, 03:58 AM
#4
Thread Starter
Member
bump
-
Jan 3rd, 2004, 04:27 PM
#5
Hyperactive Member
I think what you're trying to do is multiply the numericupdown value with 1.50 and add the listbox value.
VB Code:
Dim MyTotal As Double = (NumericUpDown1.Value * 1.5) + _
Convert.ToDouble(ListBox1.SelectedItem.ToString)
Is this what you are trying to do?
Last edited by jovton; Jan 3rd, 2004 at 04:42 PM.
jovton
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
|