Guest Posted March 12, 2011 Share Posted March 12, 2011 Message from: "ayweo" Hi Farshad: you have plans to create a InputBox component? Thanks . Quote Link to comment Share on other sites More sharing options...
Guest Posted March 13, 2011 Author Share Posted March 13, 2011 Message from: "Farshad Mohajeri" "ayweo" wrote in message news:34poE2F4LHA.3560@anaxagvs227... > Hi Farshad: > > you have plans to create a InputBox component? > Probably no because it can be emulated using other components. . Quote Link to comment Share on other sites More sharing options...
Guest Posted March 14, 2011 Author Share Posted March 14, 2011 Message from: "ayweo" Probably no because it can be emulated using other components. But if not it is very convenient. . Quote Link to comment Share on other sites More sharing options...
Guest Posted March 14, 2011 Author Share Posted March 14, 2011 Message from: "ayweo" If he can have a similar "UniCalendarDialog" to achieve a component like a inputbox "Farshad Mohajeri" дÈëÏûÏ¢ news:wjuX7la4LHA.2168@anaxagvs227... "ayweo" wrote in message news:34poE2F4LHA.3560@anaxagvs227... > Hi Farshad: > > you have plans to create a InputBox component? > Probably no because it can be emulated using other components. . Quote Link to comment Share on other sites More sharing options...
Guest Posted March 14, 2011 Author Share Posted March 14, 2011 Message from: "Farshad Mohajeri" Hi,Is this what you need?function InputBox(const ACaption: string; const = APrompt: string; const ADefault: string): string; Quote Link to comment Share on other sites More sharing options...
Guest Posted March 14, 2011 Author Share Posted March 14, 2011 Message from: "ayweo" I have achieved a similar unit in my project. unit InputBoxUnit; interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, uniGUIForm, uniGUITypes, StdCtrls, = UniButton, UniEdit, UniLabel; type TCallBack =3D procedure (Value: string) of object; TInputBox =3D class(TUniForm) lbl1: TUniLabel; edt_InputEdt: TUniEdit; btn_OK: TUniButton; btn_No: TUniButton; procedure btn_OKClick(Sender: TObject); procedure btn_NoClick(Sender: TObject); private FCallBack: TCallBack; procedure SetCallBack(const Value: TCallBack); { Private declarations } public { Public declarations } property CallBack: TCallBack read FCallBack write SetCallBack; procedure Show(Cap, Txt, Def: string; ACallBack: TCallBack); end; function InputBox: TInputBox; implementation {$R *.dfm} uses MainModule, uniControls; function InputBox: TInputBox; begin Result :=3D TInputBox(UniMainModule.GetFormInstance(TInputBox)); end; { TInputBoxForm } procedure TInputBox.btn_NoClick(Sender: TObject); begin Close; end; procedure TInputBox.btn_OKClick(Sender: TObject); begin if Trim(edt_InputEdt.Text) <> '' then FCallBack(edt_InputEdt.Text); Close; end; procedure TInputBox.Show(Cap, Txt, Def: string; ACallBack: TCallBack); begin Caption :=3D Cap; lbl1.Caption :=3D Txt; edt_InputEdt.Text :=3D Def; CallBack :=3D ACallBack; ShowModal; end; procedure TInputBox.SetCallBack(const Value: TCallBack); begin FCallBack :=3D Value; end; end. "Farshad Mohajeri" =D0=B4=C8=EB=CF=FB=CF=A2 = news:Z7Xt$Ll4LHA.2168@anaxagvs227... Hi,Is this what you need?function InputBox(const ACaption: string; const = APrompt: string; const ADefault: string): string; Quote Link to comment Share on other sites More sharing options...
Guest Posted March 15, 2011 Author Share Posted March 15, 2011 Message from: "Farshad Mohajeri" OK thanks for the hint. Request logged : #914 "ayweo" wrote in message = news:boP5z$l4LHA.2168@anaxagvs227... I have achieved a similar unit in my project. unit InputBoxUnit; interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, uniGUIForm, uniGUITypes, StdCtrls, = UniButton, UniEdit, UniLabel; type TCallBack =3D procedure (Value: string) of object; TInputBox =3D class(TUniForm) lbl1: TUniLabel; edt_InputEdt: TUniEdit; btn_OK: TUniButton; btn_No: TUniButton; procedure btn_OKClick(Sender: TObject); procedure btn_NoClick(Sender: TObject); private FCallBack: TCallBack; procedure SetCallBack(const Value: TCallBack); { Private declarations } public { Public declarations } property CallBack: TCallBack read FCallBack write SetCallBack; procedure Show(Cap, Txt, Def: string; ACallBack: TCallBack); end; function InputBox: TInputBox; implementation {$R *.dfm} uses MainModule, uniControls; function InputBox: TInputBox; begin Result :=3D TInputBox(UniMainModule.GetFormInstance(TInputBox)); end; { TInputBoxForm } procedure TInputBox.btn_NoClick(Sender: TObject); begin Close; end; procedure TInputBox.btn_OKClick(Sender: TObject); begin if Trim(edt_InputEdt.Text) <> '' then FCallBack(edt_InputEdt.Text); Close; end; procedure TInputBox.Show(Cap, Txt, Def: string; ACallBack: TCallBack); begin Caption :=3D Cap; lbl1.Caption :=3D Txt; edt_InputEdt.Text :=3D Def; CallBack :=3D ACallBack; ShowModal; end; procedure TInputBox.SetCallBack(const Value: TCallBack); begin FCallBack :=3D Value; end; end. "Farshad Mohajeri" =D0=B4=C8=EB=CF=FB=CF=A2 = news:Z7Xt$Ll4LHA.2168@anaxagvs227... Hi,Is this what you need?function InputBox(const ACaption: string; const = APrompt: string; const ADefault: string): string; Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.