I think the error is you do not put the follwing in the onClickListener if(result < 5 || result > 60) CannonView.timeRemaining = 10; else CannonView.timeRemaining = result; It should be like this dialog.setPositiveButton("Done", new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialog, int which) { // your original code if(result...

The problem is that AlertDialog builder is actually not good for designing transparent dialog and will and always have this black background which is actually a Theme for it, instead use the Dialog to create a transparent theme instead. sample: Dialog alertDialog = new Dialog(this); alertDialog.requestWindowFeature(Window.FEATURE_NO_TITLE); alertDialog.setContentView(R.layout.tabs); alertDialog.getWindow().setBackgroundDrawable(new ColorDrawable(android.graphics.Color.TRANSPARENT)); alertDialog.show();...

You can only use typeId (AX 2009 and before) or extendedTypeStr (AX 2012) on extended data types (EDT), not enums like NoYes. It can be used on NoYesId, as it is an EDT. dialog.addFieldValue(typeid(NoYesId), NoYes::Yes, "Check"); You must call run before you can meaningful acquire the value. Dialog dialog =...

Don't use asksaveasfile, but use asksaveasfilename, which returns the chosen file name instead of an opened file. You can then create the file name with length using something like import os save_filename = asksaveasfilename() save_filename_split = os.path.split(save_filename) save_filename_length = os.path.join(save_filename_split[0], 'length'+save_filename_split[-1]) Then you have the two file names which you...

There's a way that you can move the alert dialog, by means of its yProperty(). Instead of a path transition we'll use a timeline to set this property. But since this is a read only property, we havet to use a DoubleProperty within the transition instead and use Alert.setY(). The...

You can do this. You can also do the opposite (using activities as dialogs, which is just weird). The only real reason to do so is to reuse a fragment both as a dialog and as a full screen view, perhaps for different screen sizes, etc. You might have a...

There's a way you can add a transition once the user has click on the login button using the Dialog API, before the window is closed. Using dialog.show() instead of dialog.showAndWait()`, the trick is just trapping the click action on the button, consume the event, and then perform the required...

This is actually more complicated than I initially thought, unless I'm missing an easier way. I was able to reproduce your issue and the way I solved it was by using a method delAutoCompleteString() which exists on the formRun(), which is created when you call dialog.run() or it can be...

If you want to change the text, you need to write your own DDX- validation routine. The DDX-Stuff is very simple. Look into the MFC source code. DDX_Text just calls a static MFC function named _Afx_DDX_TextWithFormat. This function simply calls sscanf and if this fails shows a prompt on error....

You cannot add a textfield to the JOptionPane.showOptionDialog first Parameter is the parent component not a child component. See the documentation: public static int showOptionDialog(Component parentComponent, Object message, String title, int optionType, int messageType, Icon icon, Object[] options, Object initialValue) throws HeadlessException Brings up a dialog with a specified icon,...

You can just write your own XML file and import it, you don't need an asset for that. In the XML file you can have an attribute in the header of each dialog to be able to define who should say what. The XML document class can help with that...

Here is what you need to do: You should make CInternetSession m_Session; a member of your CWinApp-derived class. You should call m_Session.Close() in ExitInstance() method of your CWinApp-derived class. In your CDialog-derived class you should only deal with CFtpConnection related stuff. So when user clicks on Download button you should...

How about removing your p:remoteCommand and let your p:commandLink do all the work for you? Assuming you have a h:form surrounding both your dataTable and your dialog <p:commandLink action="#{bean.preEdit}" process="@this" update="dlg" styleClass="no-decor" oncomplete="PF('dlg').show()" value="Edit"> <f:setPropertyActionListener target="#{bean.currentItem}" value="#{thisItem}" /> </p:commandLink> If your dataTable is not in the same form with your...

Your first problem is that formattedDate is a String. It needs to be a java.util.Date. Your second problem comes from the fact that the AlertDialog.Builder constructor requires a Context sub-class. Fragment is not a Context sub-class, but Activity is. Try something like new AlertDialog.Builder(HomeFragment.this.getActivity()); ...

I cannot test this case, but i guess that "pageshow" is triggered more then once. Try adding $("#buttonAdd").unbind("click") Before $("#buttonAdd").on("click"... unbind tells jquery to forget all events of the argumented type to that element. ...

Stage doesn't clean up the SpriteBatch's color when it's done, so when the loop comes back around, the last-used color is still applied to the sprite batch. In your case, the last used color happens to be the dialog's color. To fix this, add getBatch().setColor(Color.WHITE); before your getBatch().draw(backgroundTexture, 0, 0,...

Not entirely sure of the real answer here, but I figured out that my problem was completely irrelevant and caused by my own ignorance/expected behavior. The 480x800 (or whatever size) bitmap is automatically scaled into the FILL_PARENT View I was adding it to. So essentially I wasted 2 days on...

We can use an option pane for this. It includes its own icons according to the type of message (and look and feel). Exception e = new Exception("Error!"); JOptionPane.showMessageDialog(f, e, e.getMessage(), JOptionPane.WARNING_MESSAGE); ...

How to add commands using Visual Studio Class Wizard in Visual Studio, open your project, then in the upper menu go to: Project>Class Wizard select your project and your class name(in your case CTestHarnessDlg) on the Commands tab in the search field type your Edit ID Select it and the...

If you code a handler for BN_CLICKED for the menu button, it will respond with 0 for m_nMenuResult if the click is on the button, or, m_nMenuResult will contain the ID of the menu item selected. If that's not what you wanted, I think you're fighting against the way the...

If you need to shut down Outlook you may use the Quit method of the Application class. The associated Outlook session will be closed completely; the user will be logged out of the messaging system and any changes to items not already saved will be discarded. But if you need...

When you try to update a component from ManagedBean using RequestContext.update() you should not use the relative component id, because you'd have nothing to relate to. To fix your problem remove : before Requests in your listener. RequestContext.getCurrentInstance().update("Requests"); If you feel updating a component from managed bean, increases cohesion. You...

I need to mention first that I'm an Evernote employee. I tried your snippet and it can work. It depends on this method: imageIntent.putExtra(Intent.EXTRA_STREAM, getImageUri(getActivity(), curBitmap)); You may want to post how you generate the Uri. In my test this definitely doesn't work if your file is in your app's...

There are 3 problems. You're nesting <p:dialog> components. This doesn't make sense. Separate them. A <p:dialog> must have its own <h:form>, particularly when you explicitly use appendToBody="true" or appendTo="@(body)", otherwise nothing can be submitted because JavaScript would relocate the dialog out of its position in the HTML DOM tree to...

There is some design issues here, for this type of interface the program should save automatically. If user is deleting the file then confirm it with modeless dialog. This way data is not lost if user is impatient. Anyway, you can just override OnPaint etc. and draw the icon void...

I don't think webflow parent -> subflow transitions were design for such a problem. Web flow assumes you are transitioning from page -> page. Your best bet is to make ajax/javascript call while the pop up window is initializing to a specific transition defined in your parent/main flow and place...

When using OFN_EXPLORER, you have to move hdlg's parent window, as the HWND passed to your callback is not the actual dialog window. This is clearly stated in the documentation: OFNHookProc callback function hdlg [in] A handle to the child dialog box of the Open or Save As dialog box....

The <p:dialog> supports the ajax close event. This only requires it being placed inside a <h:form> (on contrary to the general recommendation), so you need to make sure that it's already manually poisitioned to the very end of the <h:body> and that you don't make use of appendToBody. <h:body> <h:panelGroup...

You are on the right track by always saving the text in $CUS_FULLNAME in the leave callback but you never use $CUS_FULLNAME to set the text when creating the page, you seem to try to do something with ${CUS_FULLNAME} instead! It should probably look more like this: ${NSD_CreateText} 60u 50u...

Here, Finally i am going to answer my question. Using AlertDialog.THEME_HOLO_LIGHT won't works if you want the dialog to be full screen. An alternative is to create your own style, like so: public static Dialog createDialog( Context context, int viewId ) { Dialog lDialog = new Dialog( context, R.style.ThemeDialogCustom );...

I'm not entirely sure about what you're trying to say, but if you really want to call an external function, but you have no idea how to pass the parameters, you can still write an inline click handler that passes the arguments to your external function, for example: registry.byId("myBtn").on("click", function()...

Perhaps what you're experiencing is similar to this post: NetBeans (Java Swing): Set window size I remember experiencing something similar and shared my experiences in a post there. Edit: (28/05/2015) Just to clarify/elaborate, here are steps I've got to replicate (and resolve) the issue I encountered, which might be what...

Yes, it can be accomplished. See this functioning demo On the modal div add a class for modeless: <div class="modal fade modeless" ... Then add CSS for it: .modeless{ top:10%; left:50%; bottom:auto; right:auto; margin-left:-300px; } Note that the margin-left is what is centering it. The default size for the bs...

In the layout file are images, is it possible to set on the images in the layout "setOnClickListener"? yes it is possible. Keep a reference to the inflated view, and use this to findViewById View view= inflater.inflate(R.layout.dialog_rate, null); view.findViewById(R.id.yourid).setOnClickListener(...); builder.setView(view) ...

Remove the trigger and add widgetVar to the p:blockUI component to be able to trigger it directly. <p:blockUI block=":Requests" widgetVar="blockUIVar"> Have your print button set a global js variable. <p:commandButton value="Print" id="Print" actionListener="#{hrd.updatePrint}" onclick="window.printClicked = true;"/> Check the variable state and trigger UI block if necessary at the start of...

The action method is not called because of the type="button" attribute - there is no submit to the server. Remove type, then the action will be triggered (the button will assume the default submit type).

This is a classic example of putting all your eggs into a single basket and then wondering why you end up with an omlet. Java is OO language, you should break down your classes into areas of responsibility, building up the functionality through layers, which provides you with flexibility and...

That's because you are resizing (and keeping the aspect ratio of) the entire dialog. If you remove that .parent() call, you resize only the contents of the dialog window. But then, the dialog window don't resize with the contents, right? So you have to reset its size everytime you resize...

first of all the metro 3.0 is till in beta so it will probably still be improved. It contrast to 2.0 it relies heavily on html5 data attributes and hence it can be specified on the html code but can still be modified in the javascript by using methods like...

A static method is not associated with any particular instance of a class. It is a method associated with the class itself. Thus this has no meaning in a static method- there is no instance of the class to reference. If this method is in a class that is a...

Save the toast text as a string ressource in your strings.xml file. You can do this by adding this to your file: <string name="examplestring">Insira o valor do empréstimo.</string> Then just call the toast with: Toast.makeText(Emprestimo.this, getResources().getString(R.string.examplestring), Toast.LENGTH_LONG).show() If you don't want Portuguese to be the default language you should get...

The error message you got seems pretty clear. You need to initialize the dialog ($(dialogID).dialog()) prior to calling methods ($(dialogID).dialog("isOpen")). Simply add the initialization line before using the dialog...

You need to include the OFN_ENABLESIZING flag when using OFN_ENABLEHOOK. This is documented behavior: OPENFILENAME structure OFN_ENABLESIZING 0x00800000 Enables the Explorer-style dialog box to be resized using either the mouse or the keyboard. By default, the Explorer-style Open and Save As dialog boxes allow the dialog box to be resized...

Found the solution on my own after a lot of digging through stack overflow answers with no results. The idea is to expand the entire dialog first to full screen, but have a transparent overlay view covering empty parts. The dialog.xml now looks like this: <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical">...

What you are looking for is MakeModal(). So in your frame's class, you would call something like this: self.MakeModal(True) This only applies to wxPython classic. If you happen to be using Phoenix, then you'll want to take a look at the Migration Guide as MakeModal was removed: http://wxpython.org/Phoenix/docs/html/MigrationGuide.html#makemodal ...

From the Doorbell.io website, and gracious assistance from the developer, it seems that the constructor you're using expects an Activity as the first argument. In the code you've provided, the Doorbell object is instantiated within an anonymous DialogInterface.OnClickListener class, so, in that scope, the this keyword refers to that anonymous...

The problem definitely lies with your usage of Dart's Event class. It simply does not support the extra properties that Chrome is adding to the event: e.dialog, e.messageText, e.messageType. It does not seem like there is a ready solution for that, at least not in chrome.dart. Sadly, I don't know...

You can center the text using the form control: Dialog dialog = new Dialog("Dialog example"); DialogText t1 = dialog.addText(strFmt("Text to show")); DialogText t2 = dialog.addText(strfmt("SecondText to show")); FormStaticTextControl c1 = t1.control(); c1.widthMode(FormWidth::ColumnWidth); c1.alignment(FormAlignment::Center); dialog.run(); The first control is now centered (to the surrounding group). You have to give it ColumnWidth,...

you shouldn't access your text view from activity in your dialog you have this constructor public CustomDialogInfoClass(Context context) { super(context); } so make this one too: public CustomDialogInfoClass(Context context,String text) { CustomDialogInfoClass(context); this.text = text; } and make a String field in your dialog class String text; and setup your...

Here is the documentation for windows.onCloseRequest: Called when there is an external request to close this Window. The installed event handler can prevent window closing by consuming the received event. So, if you don't consume the close request event in the close request handler, the default behavior will occur (the...

That is simple. The IDs get converted to Decimal value in java file once you generate the apk. You have to convert it to Hexadecimal (you can do it using Calculator). Once you get the Hexadecimal value, just you need to search it inside R.java file, you will get the...

You just need to import android.app.Dialog. If you look at the documentation, android.support.v7.app.AlertDialog extends android.app.Dialog. In Android Studio, you can just click on the item that doesn't compile, and click Alt+Enter in order to add the necessary import. If there are multiple possibilities, it will give you a list to...

I did some research and got the solution. You need to use callback method in fragment. For this purpose,you need to use the following codes: your_button_on_fragment.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { ((YourActivityName)getActivity()).showRegisterDialog(); } }); ...

DoModal() returns -1 when your resource is not mapped correctly with dialog. If you step into DoModal() you will find statement // return -1 in case of failure to load the dialog template resource I would suggest you to call AfxSetResourceHandle(); function before DoModal()....

As @Eddwhis noted in the comments above the <item name="windowNoTitle">true</item> in the Theme also hides the title of the dialog. I fixed it by adding a custom AppCompatDialgStyle in which I set <item name="windowNoTitle">false</item> to false. Base theme: <style name="Theme.App.Base" parent="Theme.AppCompat.Light.DarkActionBar,"> ... <item name="alertDialogTheme">@style/Theme.App.AppCompatDialogStyle</item> <item name="dialogTheme">@style/Theme.App.AppCompatDialogStyle</item>...

Summary of discussion: misplaced ExtLib dialog is caused by its content. Specifying the exact height and width of the dialog will solve the problem. See also: Extlib dialog appears to be pinned to the right window border...

The --inputmenu option in dialog is the closest fit; anything more would require a custom application. Regarding the "Ok/rename/cancel", there is some flexibility (see manual page): --nocancel Suppress the "Cancel" button in checklist, inputbox and menu box modes. A script can still test if the user pressed the ESC key...

It launches all the dialog cause you call $('.dialog').addClass("dialog-opened"); Which mean you'll open ALL the elements who have dialog class. You can fix this by doing this: $(popupId).parent().addClass("dialog-opened"); and the same to remove the dialog $(popupId).parent().removeClass("dialog-opened"); Look at this JSFiddle Note that, I don't know if it's the right behavior...

Actually lets try this code instead with ON_WM_NCHITTEST(). This will drag the dialog if you click the mouse anywhere in client area (client area acts as caption). There is a line rc.bottom = rc.top + 100 if you uncomment it then it will only drag if you click the top...