L lyfwz Unregistered / Unconfirmed GUEST, unregistred user! 2001-09-25 #1 我想在EDIT.TEXT里填入数字,但为了财务人员的阅读方便,需要右对齐。 我这个人比较懒也比较菜,想找一个简单的方法,不知哪位可告知?
K Kingron Unregistered / Unconfirmed GUEST, unregistred user! 2001-09-25 #3 继承一个控件,重载CreateParams,修改Style即可。有一个ES_RIGHT参数·
U ugvanxk Unregistered / Unconfirmed GUEST, unregistred user! 2001-09-25 #4 我这里有一个floatedit的控件,你要吗? ugvanxk@china.com
K Kingron Unregistered / Unconfirmed GUEST, unregistred user! 2001-09-25 #6 继承TEdit,重载CreateParams,修改Param即可。 procedure TEdit_Ex.CreateParams(var Params: TCreateParams); begin inherited; if self.FTextOnRight then Params.Style:=Params.Style or ES_RIGHT; end;
继承TEdit,重载CreateParams,修改Param即可。 procedure TEdit_Ex.CreateParams(var Params: TCreateParams); begin inherited; if self.FTextOnRight then Params.Style:=Params.Style or ES_RIGHT; end;
P pcexplorer Unregistered / Unconfirmed GUEST, unregistred user! 2001-09-25 #7 我来补充 [] TAEdit=class(TEdit) procedure CreateParams(var Params: TCreateParams); override; private // public // end; {-----------------------------------------------------------------} var AEdit:TAEdit; { TAEdit } procedure TAEdit.CreateParams(var Params: TCreateParams); begin inherited CreateParams(Params); Params.Style:=Params.Style or ES_RIGHT; end; procedure TForm1.Button1Click(Sender: TObject); begin AEdit:=TAEdit.Create(self); AEdit.Parent:=Form1; AEdit.Left:=100; AEdit.Top:=100; AEdit.Width:=100; end; [8D]
我来补充 [] TAEdit=class(TEdit) procedure CreateParams(var Params: TCreateParams); override; private // public // end; {-----------------------------------------------------------------} var AEdit:TAEdit; { TAEdit } procedure TAEdit.CreateParams(var Params: TCreateParams); begin inherited CreateParams(Params); Params.Style:=Params.Style or ES_RIGHT; end; procedure TForm1.Button1Click(Sender: TObject); begin AEdit:=TAEdit.Create(self); AEdit.Parent:=Form1; AEdit.Left:=100; AEdit.Top:=100; AEdit.Width:=100; end; [8D]