Hello
I have a new class which inherits from TextBox and
implements a numeric textbox which have to allow the user
to input signed numbers. The control of key input is OK.
The problem is how to implement the display of the sign
character. I am planning to enabled this feature by
allowing the pressing of plus and minus keys (+ and -).
When the user hits the minus key, the negative sign
appears at the left side of the number; when he hits the
plus key, no sign is shown in the textbox.
This means that changing the left margin of the textbox is
not enough to make this feature work because the textbox's
default alignment is at the right side, and, in addition,
the textbox must allows the programmer to change the
text's alignment.
I do not want to include the negative sign character in
the text because of the lot of code I will have to write
in order to control user key hitting. I am thinking about
just painting the negative sign character at the left side
of the text, without including it in the text, by handling
some paint event.
Does somebody knows some guidelines on how can I do this?
Celio C Jr