Click here to Skip to main content
15,904,500 members
Home / Discussions / C#
   

C#

 
GeneralRe: Any help Christian? :) Pin
amitmohanty24-Aug-05 15:43
amitmohanty24-Aug-05 15:43 
GeneralRe: Any help Christian? :) Pin
Christian Graus24-Aug-05 16:06
protectorChristian Graus24-Aug-05 16:06 
GeneralRe: Any help Christian? :) Pin
amitmohanty24-Aug-05 16:14
amitmohanty24-Aug-05 16:14 
GeneralRe: Class Question from Newbie Pin
Christian Graus24-Aug-05 13:52
protectorChristian Graus24-Aug-05 13:52 
GeneralRe: Class Question from Newbie Pin
Christian Graus24-Aug-05 14:10
protectorChristian Graus24-Aug-05 14:10 
GeneralFinding Friday Pin
eggie524-Aug-05 12:28
eggie524-Aug-05 12:28 
GeneralRe: Finding Friday Pin
Christian Graus24-Aug-05 12:45
protectorChristian Graus24-Aug-05 12:45 
GeneralNumericUpDown Problem Pin
wjr-itt24-Aug-05 12:14
wjr-itt24-Aug-05 12:14 
Try this simple test:

Drop a NumericUpDown control (nud1) and a Button (b1) on a form. Make sure that nud1.DecimalPlaces is set to 0. In the Click handler of b1, display the value of nud1 by doing MessgeBox.Show(nud1.Value.ToString()). Run the application and type 4.513 in nud1 and click b1. The MessageBox will display 4.513 as the value, but nud1 will contain 5. Now click the up arrow of nud1 and then click b1. The MessageBox will now display 5.513 and nud1 will contain 6. If you type a new value, say 17, into nud1, the decimal places will go away. The same type of problem shows up if you set nud1.DecimalPlaces to 3 and type 7.12345 in nud1 (the extra decimal places hang around).

You can get around this by using the NumericUpDown.Text property (it always gives the correct value). However, studio does not show this property in the properties window and it does not appear when performing a ‘code complete’ when typing. The Text property is an overridden property of UpDownBase.

This appears to be a big problem since all of the msdn examples for NumericUpDown use the Value property to retrieve the value of a NumericUpDown. Does anyone have any comments/opinion?

Thanks …

wjr@itt WTF | :WTF:

GeneralRe: NumericUpDown Problem Pin
Christian Graus24-Aug-05 12:47
protectorChristian Graus24-Aug-05 12:47 
GeneralRe: NumericUpDown Problem Pin
wjr-itt24-Aug-05 13:42
wjr-itt24-Aug-05 13:42 
GeneralRe: NumericUpDown Problem Pin
Christian Graus24-Aug-05 13:50
protectorChristian Graus24-Aug-05 13:50 
GeneralRe: NumericUpDown Problem Pin
wjr-itt24-Aug-05 13:58
wjr-itt24-Aug-05 13:58 
GeneralRe: NumericUpDown Problem Pin
Christian Graus24-Aug-05 14:06
protectorChristian Graus24-Aug-05 14:06 
GeneralRe: NumericUpDown Problem Pin
wjr-itt24-Aug-05 14:16
wjr-itt24-Aug-05 14:16 
GeneralRe: NumericUpDown Problem Pin
Christian Graus24-Aug-05 14:23
protectorChristian Graus24-Aug-05 14:23 
GeneralRe: NumericUpDown Problem Pin
wjr-itt25-Aug-05 4:00
wjr-itt25-Aug-05 4:00 
GeneralGRAPHICS IN C# and ASP.net Pin
Anonymous24-Aug-05 12:08
Anonymous24-Aug-05 12:08 
GeneralRe: GRAPHICS IN C# and ASP.net Pin
Christian Graus24-Aug-05 12:45
protectorChristian Graus24-Aug-05 12:45 
GeneralAccessing parts of identical use controls Pin
Mikan2324-Aug-05 11:35
Mikan2324-Aug-05 11:35 
GeneralRe: Accessing parts of identical use controls Pin
rudy.net24-Aug-05 17:03
rudy.net24-Aug-05 17:03 
GeneralRe: Accessing parts of identical use controls Pin
Mikan2324-Aug-05 19:21
Mikan2324-Aug-05 19:21 
Generalgetting partial url Pin
philly_dan24-Aug-05 11:19
philly_dan24-Aug-05 11:19 
GeneralRabbi Plotkin's Continuous Form Pin
cgweaver24-Aug-05 10:29
cgweaver24-Aug-05 10:29 
GeneralWeek of month Pin
ehuysamer24-Aug-05 9:49
ehuysamer24-Aug-05 9:49 
GeneralRe: Week of month Pin
Christian Graus24-Aug-05 11:02
protectorChristian Graus24-Aug-05 11:02 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.