pro_imaj Posted January 29, 2017 Share Posted January 29, 2017 Merhaba; Simple Prompt örneğini inceliyorum, veri girişini sadece sayısal zorunlu girişe nasıl çevirebilrim. Saygılarımla Teşekkürler. Quote Link to comment Share on other sites More sharing options...
pro_imaj Posted January 30, 2017 Author Share Posted January 30, 2017 Prompt kullanırken Screen Mask'te çıkan mesajı nasıl değiştirebilirim. Quote Link to comment Share on other sites More sharing options...
Sherzod Posted January 30, 2017 Share Posted January 30, 2017 Merhaba; Simple Prompt örneğini inceliyorum, veri girişini sadece sayısal zorunlu girişe nasıl çevirebilrim. Saygılarımla Teşekkürler. Hi, Do you want allow to the user to enter only numbers ?! Quote Link to comment Share on other sites More sharing options...
pro_imaj Posted January 30, 2017 Author Share Posted January 30, 2017 Yes, I just want the number to be entered Quote Link to comment Share on other sites More sharing options...
Sherzod Posted January 31, 2017 Share Posted January 31, 2017 Hi, Then, can you try this approach for now?!: For example: procedure TMainForm.UniButton1Click(Sender: TObject); begin Prompt('Please enter a number', '', mtInformation, mbOKCancel, PromptCallBack); // --> UniSession.AddJS('Ext.get("messagebox-1001-textfield-inputEl").on("keydown", '+ 'function(e) {var code = e.browserEvent.keyCode; if (!(code>=48&&code<=57)&&!(code>=97&&code<=105)&&code!==46&&code!==8) '+ '{e.stopEvent();}})'); end; procedure TMainForm.PromptCallBack(Sender: TComponent; AResult:Integer; AText: string); begin if AResult = mrOK then begin UniMemo1.Lines.Add(AText); end; UniSession.AddJS('Ext.get("messagebox-1001-textfield-inputEl").un("keydown")'); //<-- end; Best regards. Quote Link to comment Share on other sites More sharing options...
pro_imaj Posted January 31, 2017 Author Share Posted January 31, 2017 Nice! Thank You. Best regards Quote Link to comment Share on other sites More sharing options...
Sherzod Posted January 31, 2017 Share Posted January 31, 2017 but still need to think about "paste" from the "context menu"... Quote Link to comment Share on other sites More sharing options...
pro_imaj Posted January 31, 2017 Author Share Posted January 31, 2017 It works very well. 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.