dialog

Communicate between fragment and fragment dialog

青春壹個敷衍的年華 提交于 2020-01-06 08:50:02
问题 I researched on SO about communicating between fragment and fragment dialog, and I found that setTargetFragment and an interface is an approach. But I get this error when I try to setTargetFragment. The method setTargetFragment(Fragment, int) in the type Fragment is not applicable for the arguments (SettingsDetailsFragment, int). I haven;t use fragments until now and I'm new on android. So i have this fragment: public class SettingsDetailsFragment extends Fragment implements

No soft keyboard for the EditText inside the Dialog Box

你离开我真会死。 提交于 2020-01-06 08:33:12
问题 I'd like to create a Dialog Box where the user can insert a number; so I overrided the onCreateDialog method this way: protected Dialog onCreateDialog(int id) { EditText editNum=new EditText(this); editNum.setMaxLines(1); editNum.setRawInputType(InputType.TYPE_CLASS_NUMBER); String strVal=listViewNum.getItemAtPosition(selectedItem).toString(); strVal=strVal.substring(strVal.indexOf("=")+1,strVal.length()-1); editNum.setText(Util.formatNumber(Double.parseDouble(strVal))); editNum.selectAll();

How to invoke a button using C++ Win32 API when press the enter button?

∥☆過路亽.° 提交于 2020-01-06 07:45:28
问题 i have created a dialogbox using c++ win32 API... there are 3 text box,1 combo box and 3 buttons... now i have 2 problems... 1.when i press the ENTER button,it invoke second button(ID_OK) function,but i want to invoke first button(ID_MYBUTTON)... 2.i am using the code to focus a textbox is, SetFocus(GetDlgItem(_hwnd, IDC_NAME)); But it cant focus that dialogbox,i mean cursor position is there,but cant get any value,when i typed... Can anyone resolve it? 回答1: This may answer both your

getString and DialogListener doesn't work after class switch

允我心安 提交于 2020-01-06 07:29:24
问题 I want to start an activity and give out a Toast message after I parsed a JSON response, well as you can't do that while a Dialog is open, I am using a DialogListener, which actually works fine, but not when it gets called in the parseJSON method. public class Pop_Forgot_PW extends AppCompatDialogFragment{ ...... sendResetMail(); private void sendResetMail() { final String url = "someURL"; new Json(new Json.Callback() { @Override public void run(String result) { parseJSON(result); } })

React JS - How to add style in PaperProps of Dialog (material-ui)

随声附和 提交于 2020-01-06 07:10:18
问题 I am using Dialog components from material-ui ReactJs. <Dialog fullScreen open={this.state.open} PaperProps={{ classes: {root: classes.dialogPaper} }} onClose={this.handleClose.bind(this)} transition={this.props.transition}> {this.props.children} </Dialog> In the above code I already override the root classes of PaperProps. Now I also want to override the style in the PaperProps. Is that possible in the PaperProps to override the styles. Something like PaperProps={{ classes: {root: classes

Accessibility of confirm dialog in chrome

你。 提交于 2020-01-06 07:09:08
问题 The confirmation dialogues in chrome are not accessible to JAWS screenreader (Version 18.0.2945). I experienced that with a simple onbeforeUnload dialog as well as with a javascript confirm dialog. The text in the dialog will not be read. Did anyone experience similar problems or knows an answer? 回答1: As of today, 18/09/2017, this is a jaws issue. The code works on all other major browsers. There is no solution at present. Just for your information, alert and prompt have the same problem.

Simple value input in a Windows program

痴心易碎 提交于 2020-01-06 05:58:05
问题 I have a program that runs in the Win32 environment. There is one variable that I would like to set before the program begins. The only reason it is a Win32 program is because I am accessing serial ports. I don't care how I input the variable - it is a number and I suppose a dialog edit box would be best - but I don't know how to go about this with Win32! Ignoring the bulk of the program, my code is as follows: #include <windows.h> //Initialise Windows module int WINAPI WinMain (HINSTANCE

botframework confirm dialog, send message as user

余生长醉 提交于 2020-01-06 04:33:23
问题 I have created a confirm dialog where the user can select yes/no private async Task Confirm(IDialogContext context, IAwaitable<bool> result) { var res= await result; await context.PostAsync(res? "Proceed" : "Ok then"); if (res) { ...... } } If the user selects Yes he will receive the message "Proceed" At the same time (again if "res" is true), i want to send a specific message to the bot without appearing in the conversation. Is there a way to send a custom message back to the bot when user

Is there a way to proactively end a prompt, i.e with a timer or event, from the WaterfallStepContext in the Microsoft Bot Framework

无人久伴 提交于 2020-01-06 04:31:14
问题 From what I see, in the nodejs framework, I notice you can't prompt a user within a dialogflow dialog and retrieve the that prompt within the same dialog function... I may be wrong about that. Either way, you can return prompt and retrieve it in the next dialog flow. Is there a way to cut off the awaiting prompt for user input and end or resume an activity of the dialog? I would like to cut the prompt off at a certain point, ideally on a time basis. 回答1: This is possible thru using a

How to avoid closing of Gtk.Dialog in Python?

与世无争的帅哥 提交于 2020-01-05 15:08:13
问题 I have a form in a Gtk.Dialog which has an "Ok" button and a "Cancel" button. When I click on the Ok button, the dialog returns 1 and when I click on Cancel button, it returns 0. What I want to make is to validate the fields of the form so that if any field has invalid data, like letters in a numeric field or empty fields, the dialog can not be destroyed if Ok button is pressed. 回答1: You could define a custom dialog. Here you can find an example. Make shure to destroy the dialog only if your