fabreti
asked on
maskedit / CustomEdit and allignment
Hi there,
I want to insert a number like 123.232.456 and found that a mask edit would be great.
But if I set SelStart:=10 I can only insert 1 number.
Is there a way numbers shift to the left while I insert them ?
I've seen in the help that TCustomEdit have an allignment property, but where is the CustomEdit button ? (so I can insert one in my form).
thanks,
I want to insert a number like 123.232.456 and found that a mask edit would be great.
But if I set SelStart:=10 I can only insert 1 number.
Is there a way numbers shift to the left while I insert them ?
I've seen in the help that TCustomEdit have an allignment property, but where is the CustomEdit button ? (so I can insert one in my form).
thanks,
ASKER
Humm...Ok, thanks for your custom advice :-)
Well, let me explain:
if my mask is 999.999.999 then I can insert a number like 123.456.789 and it looks great.
But if my number is 1234 it will look like 123.4
Instead, if I had a way to "shift left" every digit inserted, always inserting new numbers on the right, it would look like 1.234 (looks much more like one thousand two hundred thirty for THAN 123.4, doesn't it?)
That's what I meant. Got it ?
Well, let me explain:
if my mask is 999.999.999 then I can insert a number like 123.456.789 and it looks great.
But if my number is 1234 it will look like 123.4
Instead, if I had a way to "shift left" every digit inserted, always inserting new numbers on the right, it would look like 1.234 (looks much more like one thousand two hundred thirty for THAN 123.4, doesn't it?)
That's what I meant. Got it ?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Slick,
Didn't test it yet. But gave me ideas...
Thank you for your time,
Fabreti.
Didn't test it yet. But gave me ideas...
Thank you for your time,
Fabreti.
Edit1.SelStart:=10;
{insert a charater here at the SelStart}
Edit1.SelStart:=10;
{move the claret back to where it was, or any other location}
{insert another charater here at the SelStart}