NumericUpDown.Valueに値を入れたときの評価
Windows Form アプリケーションを作成していて、動作としては、
(1)ComboBoxコントロールの選択を変更
(2)(1)に合わせて、NumericUpDownコントロールの値を変更
という、ありがちなGUIを作成したのです。
で、
(A)NumericUpDownコントロールにキーボードから数値を入力
(B)ComboBoxコントロールの選択を変更
(C)NumericUpDownコントロールの値が変わる。
という操作を行うと、(A)で222と入力したとすると、(B)の操作の後、(C)の時点で222は別の値に上書きされるはずなのですが、それがうまくいかない!
なぜか、2回目はうまくいくのに、1回目はうまくいかない。
実際には、(1)で、NumericUpDown.Value=50とかやっているだけなんですね。
でもGUI上で見ると、222がまだ残っているみたいな感じです。
調べてみたら、
[CS:01093] Re: NumericUpDown の使い方
そこで、
numericUpDown1.ResetText(); // 入力テキストをリセット
numericUpDown1.Value = 50;
としたところ、うまく更新されました。
で、できました。
[CS:01088] Re: NumericUpDown の使い方
Valueのチェックが1度は行われないとValueを更新することができない設計みたいで
す。
おーーーい!.NETさん。それでいいのかな?確かにNumericUpDownは上下ボタンを使って、値を更新するものであるから、キーボードからの直接入力なんて面倒みれません、っていいたいところでしょうけど、でもそういうニーズもあるわけで、そのあたりは吸収しておいてもらいたいなぁ。。。
I loved as much as you will receive carried out right here. The sketch is tasteful, your authored subject matter stylish. nonetheless, you command get bought an edginess over that you wish be delivering the following. unwell unquestionably come more formerly again as exactly the same nearly very often inside case you shield this increase.
Posted by: how to gain muscle | 14 November 2013 at 06:39 PM
I love what you guys are up too. Such clever work and reporting! Keep up the great works guys I've included you guys to blogroll.
Posted by: Tinnitus Treatment | 09 December 2013 at 11:42 PM
Hello, I enjoy reading all of your article post. I like to write a little comment to support you.
Posted by: Dallas Maternity Photographer | 05 August 2014 at 01:47 PM
Hello i am kavin, its my first time to commenting anywhere, when i read this post i thought i could also create comment due to this sensible post.
Posted by: Natural Treatment For Tinnitus | 09 September 2014 at 04:53 PM
I every time used to read post in news papers but now as I am a user of web therefore from now I am using net for articles, thanks to web.
Posted by: webtoolmaster | 09 September 2014 at 11:36 PM