mehmet07 Posted March 8, 2017 Share Posted March 8, 2017 Merhabalar, Prompt('Lütfen Tarihi Giriniz', DateToStr(Date), mtInformation, mbOKCancel, procedure(Sender: TComponent; AResult:Integer; AText: string) Seklinde prompt oluşturuyorum. Fakat açılan pencerenin basliginda ingilizce information yaziyor. Bu metni değiştirmek mümkün mü acaba? Quote Link to comment Share on other sites More sharing options...
Sherzod Posted March 8, 2017 Share Posted March 8, 2017 Hi, Can you try this approach for now?!: Prompt('Lütfen Tarihi Giriniz', DateToStr(Date), mtInformation, mbOKCancel, procedure(Sender: TComponent; AResult:Integer; AText: string) begin end); UniSession.AddJS('Ext.get("messagebox-1001_header_hd-textEl").setHTML("Your Caption")'); Best regards. Quote Link to comment Share on other sites More sharing options...
mehmet07 Posted March 9, 2017 Author Share Posted March 9, 2017 Thanks Delphi Developer. Quote Link to comment Share on other sites More sharing options...
artem_niko Posted January 12, 2020 Share Posted January 12, 2020 On 3/9/2017 at 12:06 AM, Sherzod said: Hi, Can you try this approach for now?!: Prompt('Lütfen Tarihi Giriniz', DateToStr(Date), mtInformation, mbOKCancel, procedure(Sender: TComponent; AResult:Integer; AText: string) begin end); UniSession.AddJS('Ext.get("messagebox-1001_header_hd-textEl").setHTML("Your Caption")'); Best regards. Hm...I'm writing that: procedure TUniFrameM1.UniSFBitBtnAddAccessClick(Sender: TObject); begin UniSession.AddJS('Ext.get("messagebox-1001_header_hd-textEl").setHTML("Новый код доступа")'); Prompt('Пожалуйста, введите новое значение кода доступа:', '', mtInformation, mbOKCancel, PromptCallBack); end; procedure TUniFrameM1.PromptCallBack(Sender: TComponent; AResult:Integer; AText: string); var proc: procedure (ACliHandle: Pointer; msccOrgRequisiteINN,msccCodeName,msccOwnerCode: WideString); begin if AResult = mrOK then begin ... end; end; and I get error and that mistake: This is full text of error: Ext.get("messagebox-1001_header_hd-textEl").setHTML("Новый код доступа");var m=Ext.Msg.show({title:"Information",msg:"Пожалуйста, введите новое значение кода доступа:",buttons:Ext.MessageBox.OK+Ext.MessageBox.CANCEL,fn:function(bid,t){ajaxRequest(O403,"promptcallback",{ButtonID:bid, text:t})},prompt:true,icon:Ext.Msg.INFO});m.textField.inputEl.dom.type="text"; Please, help!? Quote Link to comment Share on other sites More sharing options...
Sherzod Posted January 12, 2020 Share Posted January 12, 2020 32 minutes ago, Артем said: and I get error and that mistake: Hi, Can you try this?: http://forums.unigui.com/index.php?/topic/10211-how-do-i-change-caption-property-of-prompt-showmessage-and-messagedlg-window/&do=findComment&comment=53243 Quote Link to comment Share on other sites More sharing options...
artem_niko Posted January 12, 2020 Share Posted January 12, 2020 3 minutes ago, Sherzod said: Hi, Can you try this?: http://forums.unigui.com/index.php?/topic/10211-how-do-i-change-caption-property-of-prompt-showmessage-and-messagedlg-window/&do=findComment&comment=53243 And where I ,ust put this code? Show me on my quote with code. Quote Link to comment Share on other sites More sharing options...
Sherzod Posted January 12, 2020 Share Posted January 12, 2020 5 minutes ago, Артем said: And where I ,ust put this code? After "Prompt", "ShowMessage"... Quote Link to comment Share on other sites More sharing options...
artem_niko Posted January 12, 2020 Share Posted January 12, 2020 2 minutes ago, Sherzod said: After "Prompt", "ShowMessage"... i'm was write that: procedure TUniFrameM1.UniSFBitBtnAddAccessClick(Sender: TObject); begin Prompt('Пожалуйста, введите новое значение кода доступа:', '', mtInformation, mbOKCancel, PromptCallBack); UniSession.AddJS('Ext.get("messagebox-1001_header_hd-textEl").setHTML("Новый код доступа")'); end; And I get error... Quote Link to comment Share on other sites More sharing options...
Sherzod Posted January 12, 2020 Share Posted January 12, 2020 20 minutes ago, Артем said: And I get error... Please look carefully. Ext.get("messagebox-1001_header_hd-textEl") Ext.get("messagebox-1001_header-title-textEl") Quote Link to comment Share on other sites More sharing options...
artem_niko Posted January 12, 2020 Share Posted January 12, 2020 7 minutes ago, Sherzod said: Please look carefully. Ext.get("messagebox-1001_header_hd-textEl") Ext.get("messagebox-1001_header-title-textEl" Not work. If I write that: Ext.get("messagebox-1001_header-title-textEl" or if I write that: Ext.get("messagebox-1001_header_title-textEl" Error stady exist...fuck... Quote Link to comment Share on other sites More sharing options...
Sherzod Posted January 12, 2020 Share Posted January 12, 2020 I'm sorry, Can you please make a simple testcase and attach here (without third-party components)? Quote Link to comment Share on other sites More sharing options...
artem_niko Posted January 12, 2020 Share Posted January 12, 2020 Just now, Sherzod said: I'm sorry, Can you please make a simple testcase and attach here (without third-party components)? Sorry, I can't do this because my project is very big and I have't so many time that create small project. May be you have worked example? It's will be goog, I will see where I make mistake. Quote Link to comment Share on other sites More sharing options...
Sherzod Posted January 12, 2020 Share Posted January 12, 2020 procedure TMainForm.UniButton1Click(Sender: TObject); begin Prompt('Please enter a text', '', mtInformation, mbOKCancel, PromptCallBack, True); UniSession.AddJS('Ext.get("messagebox-1001_header-title-textEl").setText("Your Caption")'); end; 1 Quote Link to comment Share on other sites More sharing options...
artem_niko Posted January 12, 2020 Share Posted January 12, 2020 7 minutes ago, Sherzod said: procedure TMainForm.UniButton1Click(Sender: TObject); begin Prompt('Please enter a text', '', mtInformation, mbOKCancel, PromptCallBack, True); UniSession.AddJS('Ext.get("messagebox-1001_header-title-textEl").setText("Your Caption")'); end; Greate!!! It;s work perfect!!! Thank you, @Sherzod!!! Say, is it will be work in MessageDlg? There caption need change on my text. Quote Link to comment Share on other sites More sharing options...
Sherzod Posted January 12, 2020 Share Posted January 12, 2020 3 minutes ago, Артем said: Say, is it will be work in MessageDlg? There caption need change on my text. Yes it will work. 1 Quote Link to comment Share on other sites More sharing options...
artem_niko Posted January 12, 2020 Share Posted January 12, 2020 Greate! Very very thank's to you! 1 Quote Link to comment Share on other sites More sharing options...
artem_niko Posted February 20, 2020 Share Posted February 20, 2020 On 1/13/2020 at 12:59 AM, Sherzod said: Yes it will work. Hello! I want ask, how about Promt? How change text in caption? Quote Link to comment Share on other sites More sharing options...
Sherzod Posted February 20, 2020 Share Posted February 20, 2020 1 hour ago, Артем said: I want ask, how about Promt? How change text in caption? On 1/12/2020 at 9:47 PM, Sherzod said: Prompt('Please enter a text', '', mtInformation, mbOKCancel, PromptCallBack, True); UniSession.AddJS('Ext.get("messagebox-1001_header-title-textEl").setText("Your Caption")'); This should work. Works for me. Also you can try to call Ext.get("messagebox-1001_header-title-textEl").setText("Your Caption") with Ext.defer... Quote Link to comment Share on other sites More sharing options...
artem_niko Posted February 21, 2020 Share Posted February 21, 2020 10 hours ago, Sherzod said: This should work. Works for me. Also you can try to call Ext.get("messagebox-1001_header-title-textEl").setText("Your Caption") with Ext.defer... No no) @Sherzod, you are not right understand me and what I mean. On my screen I want replae word Information on anouther text. As here (for MessageDlg): UniSession.AddJS('Ext.get("messagebox-1001_header-title-textEl").setText("Подтверждение действия")'); But for Promt will be no Infromation in title. Quote Link to comment Share on other sites More sharing options...
Sherzod Posted February 21, 2020 Share Posted February 21, 2020 28 minutes ago, Артем said: On my screen I want replae word Information on anouther text. procedure TMainForm.UniButton1Click(Sender: TObject); begin Prompt('Please enter a text', '', mtInformation, mbOKCancel, PromptCallBack); UniSession.AddJS('Ext.get("messagebox-1001_header-title-textEl").setText("Подтверждение действия")'); end; 1 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.