Jump to content

Prompt Pencere Basligi degistirme


mehmet07

Recommended Posts

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?

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

  • 2 years later...
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:

image.png.c69bceee83f9dddb265df9313be6238a.png

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!?

Link to comment
Share on other sites

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...

Link to comment
Share on other sites

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...

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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;

 

  • Like 1
Link to comment
Share on other sites

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.

Link to comment
Share on other sites

  • 1 month later...
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... 

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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;

PromtInfo.png.54cfadf9d589d7ce6e24bae8a1a3ae17.png

  • Like 1
Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...