Revision: 4890
http://sourceforge.net/p/vexi/code/4890
Author: mkpg2
Date: 2016-10-21 21:19:33 +0000 (Fri, 21 Oct 2016)
Log Message:
-----------
Update text when any of minDP,maxDP,maxSF are set.
Modified Paths:
--------------
branches/vexi3/org.vexi-vexi.widgets/src_main/org/vexi/lib/widget/numfield.t
Modified:
branches/vexi3/org.vexi-vexi.widgets/src_main/org/vexi/lib/widget/numfield.t
===================================================================
---
branches/vexi3/org.vexi-vexi.widgets/src_main/org/vexi/lib/widget/numfield.t
2016-10-21 19:34:12 UTC (rev 4889)
+++
branches/vexi3/org.vexi-vexi.widgets/src_main/org/vexi/lib/widget/numfield.t
2016-10-21 21:19:33 UTC (rev 4890)
@@ -19,11 +19,12 @@
thisbox.maxvalue;
thisbox.value; // value and the v_edit.text are synchronized
+
thisbox.scale; // if positive, number of decimal places
// if negative, number of trailing 0s
- thisbox.minDP;
- thisbox.maxDP;
- thisbox.maxSF;
+ thisbox.minDP ++= static.updateTrap;
+ thisbox.maxDP ++= static.updateTrap;
+ thisbox.maxSF ++= static.updateTrap;
KeyTyped ++= static.keytypedEvent;
KeyPressed ++= static.keypressEvent;
@@ -83,8 +84,11 @@
const Number = vexi.js.Number;
+ static.updateTrap = function(v){
+ cascade = v;
+ this.text = this.decimal2text(this.value);
+ };
-
/** set up sync between edit.text and numfield.value */
static.editWrite = function(v) {
cascade = v;
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Vexi-svn mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/vexi-svn