[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Aw: Important change in MaskBox control
[Thread Prev] | [Thread Next]
- Subject: Aw: Important change in MaskBox control
- From: taitetao@xxxxxx
- Date: Mon, 13 Apr 2026 22:01:51 +0000
- To: user@xxxxxxxxxxxxxxxxxxxxxx
Hi,The MaskBox control was not reliable, so I rewrote its management code
in the master branch.Tell me if it is better now than before.I hope there will not be too many regressions.I added a new syntax, normally backward-compatible, that I named "weak"
separator. It's a separator that does not block character insertion or
deletion, as if it was not there. Think about the thousand separators of
a big number.To add a weak separator, put it into square brackets in the mask.For example, for typing a currency:$##<[,]###<[,]##0<!.00There is still some bugs I'm still working on, but I wanted this code to
be tested as soon as possible by those who use the MaskBox control a lot
(not me!).If this new behaviour cannot be backward-compatible, I will add some
flag to keep the old MaskBox behaviour or use the new one, so that you
don't have to adapt your project. And this flag may also be simply based
on the version of the interpreter running the project.Just tell me.--
Benoît Minisini.
Hi all,
thanks a lot for your work on the maskbox, Benoît!
First of all, the "weak separators" seem to work in cases like the suggested currency box. Personally I think it looks a bit confusing to have "separators" (e.g. for thousands etc.) somewhere in the box where you might not even reach or need them.
1) The general problem that I've discovered is still not solved:
Users that I deal with the most are mainly used to maskboxes in overwrite-mode. So characters and numbers are expected to be replaced by new entries. Think of time or date boxes, e.g. "00:00" or "00.00.0000".
The suggested changes produce a behaviour like in insert-mode, i.e. moving and shifting the existing numbers and characters even beyond the weak separators. This makes sense in the case of just big numbers.
For a time-maskbox, as an example, I would prefer the overwrite-mode and automatic jumping over the separator to the next segment to the right side. So that it is NOT necessary to use an arrow key to get to the next segment and therefore speeding up typing a lot.
In the previous master version the overwrite-mode did work, the automatic jumping over the separators didn't.
I get the impression that the "all-in-one" maskbox might be a rather complex task...
2) The maskbox freezes any application if the cursor is moved further left than the left end of a segment (separated by "strong" separators) using arrow left or backspace keys (...maybe due to negative values of position??). That might be the same bug, that Claus reported.
Best Regards,
Florian
| Re: Aw: Important change in MaskBox control | Benoît Minisini <benoit.minisini@xxxxxxxxxxxxxxxx> |