If you are using a later version of Delphi, there should already be TButtonedEdit Control and you can do your work.
If not, I think you can send the message EM_SETMARGINS to your TCustomEdit to set the left and right fields.
SendMessage(CustomEdit.Handle, EM_SETMARGINS, EC_LEFTMARGIN or EC_RIGHTMARGIN, MakeLong(LeftMargin, RightMargin));
source share