From ee7516201edd6b10c817d779cd769a5251614757 Mon Sep 17 00:00:00 2001 From: cxl Date: Wed, 29 Jan 2014 14:52:22 +0000 Subject: [PATCH] CtrlLib: .usc cosmetics, initial len statust in EditText git-svn-id: svn://ultimatepp.org/upp/trunk@6827 f0d560ea-af0d-0410-9eb7-867de7ffcac7 --- uppsrc/CtrlLib/CtrlLib.usc | 4 ++-- uppsrc/CtrlLib/CtrlUtil.cpp | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/uppsrc/CtrlLib/CtrlLib.usc b/uppsrc/CtrlLib/CtrlLib.usc index 81edb5b90..9e4a71d15 100644 --- a/uppsrc/CtrlLib/CtrlLib.usc +++ b/uppsrc/CtrlLib/CtrlLib.usc @@ -543,14 +543,14 @@ subctrl EditNotNull { ctrl EditString { >EditNotNull; + raw MaxLen; bool TrimLeft = false; bool TrimRight = false; - raw MaxLen; PaintData(w) { text = (.NotNull ? "!" : "") + "Str"; if(.MaxLen != "") - text << " < " << .MaxLen; + text << "(" << .MaxLen << ")"; PaintText(w, text); } } diff --git a/uppsrc/CtrlLib/CtrlUtil.cpp b/uppsrc/CtrlLib/CtrlUtil.cpp index a9dd1aada..1bd06197b 100644 --- a/uppsrc/CtrlLib/CtrlUtil.cpp +++ b/uppsrc/CtrlLib/CtrlUtil.cpp @@ -147,6 +147,7 @@ bool EditText(String& s, const char *title, const char *label, int (*f)(int), in if(maxlen) { dlg.text.MaxLen(maxlen); dlg.text <<= callback3(sSyncLabel, &dlg.lbl, label, &dlg.text); + dlg.text.WhenAction(); } if(dlg.Execute() == IDOK) { s = dlg.text;