dialog

How to disable all exception raising in Delphi?

风格不统一 提交于 2020-01-13 11:26:09
问题 Is there a way to disable all the dialog boxes when an exception or error occurs(like access violations, indy socket errors, timeouts etc.)? They are thrown sometimes in my program, but these errors aren't fatal in any way and can be ignored, just the dialog boxes are disturbing. I use Delphi 7. 回答1: If you just don't wont to show the exception window then go to: Tools/Options/Debugger Options/Language Exceptions and disable CheckBox Notify on language exceptions . That is walid for Delphi

How to position a p:dialog in Prime Faces after its resizing

为君一笑 提交于 2020-01-13 08:35:51
问题 I have a Prime Faces p:dialog that has been resized while new components are inserted when opened ('show' state). However its position doesn't change and it's size is increasing from the down left corner until the page bottom. I need to reposition it every time I render new components dynamically. Is there any JavaScript function I can call to its widget to reposition? I'm using PrimeFaces 3.5 with Mojarra 2.1.13. 回答1: This is a method that should work in your case : Bean code : @ManagedBean

In ASP.Net MVC, what is the best way to do an update from a dialog?

百般思念 提交于 2020-01-13 06:38:01
问题 I'm trying to combine 2 parts of MVC that I haven't seen used together: 1) Ajax and 2) Error handling. The problem lies in what is returned and where (div element to update) that it's returned. I have an ASP.net MVC page that looks like the following <%@ Page Language="C#" Inherits="System.Web.Mvc.ViewPage<Store>" %> <div id="MainPage> <div id="Some Stuff> Lorem Ipsum </div> <div id="CustomerList> <% Html.RenderPartial("~/Views/Customers/List.ascx", Model.Customers); %> </div> <div id="dialog

How Can I Keep the FindDialog from Staying on Top (Delphi)?

一笑奈何 提交于 2020-01-12 20:54:33
问题 In Delphi 2009, I do a simple: FindDialog.Execute; The FindDialog window stays on top of my program's main window as it should. However, if I open another window from some other program over my own program's window, the FindDialog window remains on top of the other window. If I try this with a FindDialog from another program (e.g. Notepad), this does not happen. Opening another program's window over Notepad and its FindDialog will cover both the Notepad and FindDialog windows. This seems to

EditTextPreference Disable Buttons?

六月ゝ 毕业季﹏ 提交于 2020-01-12 05:44:06
问题 I want to have an EditTextPreference that will disable the OK button if there is no text in the EditText field. I created a custom EditTextPreference class and I am able to get the EditText object and set a TextWatcher, but I can't find a way to disable the button. It looks like I just don't have access to the OK and Cancel buttons in the Dialog. Anyone know a way to get at these buttons or to do what I am trying to do? Only other option is to try to create from scratch a custom Dialog that

迁移 到AndroidX 的一些坑

℡╲_俬逩灬. 提交于 2020-01-11 22:36:52
最近看github上的项目 十有八九都已经是 androidX的了,一方面感叹之余,另一方面也想把两年的老项目升级一下,说干就干,拉一个分支,一波走起。 gradle.properties 配置一波 #表示当前项目启用 androidx android . enableJetifier = true #表示将依赖包也迁移到androidx android . useAndroidX = true app 下的gradle 因为随着时间的流逝,我们的compileSdkVersion 实际上是已经升级到28的,项目根目录下的classpath ‘com.android.tools.build:gradle:3.2.1’ 也已经升级到3.2.1 ,就只剩下 targetSdkVersion 还是23,那就先忽悠android studio 一波 ,先升级到28 ,再退回去。说干就干 然后就是点击 refactor --> migrate to androidX 随后就是漫长的等待 完成后,会有很多错误,我遇到到主要如下 butterknife版本太低 ,报 @UIThread 注解找不到的错误 虽然已经 是8.8.1了,但还是不满足 androidX 最低的 9.0的需求,直接去github上查了查,升级到最新的10.2.1 MotionLayout 报 app

How to set Transparent Background as a Custom Dialog Box in android

耗尽温柔 提交于 2020-01-11 19:48:22
问题 I need to make my custom dialog box as a transparent. Sample Code : Dialog dialog; @Override protected Dialog onCreateDialog(int id) { switch(id) { case 1: AlertDialog.Builder builder = null; Context mContext = this; LayoutInflater inflater = ( LayoutInflater ) mContext.getSystemService( LAYOUT_INFLATER_SERVICE ); View layout = inflater.inflate( R.layout.about_page, ( ViewGroup ) findViewById( R.id.about_Root ) ); builder = new AlertDialog.Builder( mContext ); builder.setView( layout );

How to save text from a Text-widget Tkinter to a .doc using asksaveasfile?

…衆ロ難τιáo~ 提交于 2020-01-11 13:54:48
问题 I want to save some stuff I entered in a Text widget to a .txt or .doc format, using an asksaveasfilename dialog box. After this I want it to open in resp. Notepad or MS Word. from tkFileDialog import asksaveasfilename import os.path name = asksaveasfilename( initialdir="dir", title="Save as", filetypes=[("Text files",".txt"),("Word files",".doc")]) data = open(name,"w") data.write("text from text widget") os.startfile(name) It creates the file but it won't open it in MS Word or Notepad.

Android: Why DialogFragment return nullpointer on orientation change

ⅰ亾dé卋堺 提交于 2020-01-11 12:58:11
问题 I have a problem with correct dialog fragment dismissing after that orientation was changed. I guess that's due to old context because after that activity was recreated there was created a new activity and corresponding context. I know that I can set some variable in onSaveInstance to save dialog status and recreate dialog if it`s necessary, or just put one attribute in manifest "orientation". But, maybe, there is something better way to do it to not hardcode it in manifest and not save in

Multiple input boxes - alertifyjs / Jquery

二次信任 提交于 2020-01-11 11:51:50
问题 I am trying to create a prompt dialog box using alertifyjs that has multiple input boxes. I have managed to create the dialog box to show the multiple boxes but I cant seem to make a reference to the inputs that user provides. I want to write if statement that carries out action based on user input when they press OK. However, the OK button doesnt seem to be working and also the if-statements don't work as well. I am not sure what I might be doing wrong, can someone please help me. Below is