Link to home
Start Free TrialLog in
Avatar of fabreti
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,
Avatar of Member_2_248744
Member_2_248744
Flag of United States of America image

there is no TCustomEdit, there is no TCustomForm, or TCustomDBGrid or any other "Custom" Class, These custom classes are "Parent" classes for other Components, The TCustomEdit is the parent class for the TEdit and TMaskEdit, and others. I don't understand your question, shift left? ? You can move the SelStart to whereever you want, for instance

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}
Avatar of fabreti
fabreti

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 ?
ASKER CERTIFIED SOLUTION
Avatar of Member_2_248744
Member_2_248744
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of fabreti

ASKER

Slick,

  Didn't test it yet. But gave me ideas...

  Thank you for your time,

Fabreti.