dialog

Primefaces Dialog Framework - Open dialog - close it - open another dialog

久未见 提交于 2019-12-23 14:51:31
问题 Primefaces 5.0, JSF 2.2, Wildfly 8.1 The following use case: Click a command button in a view (with some parameters) The bean method looks something up in the database - if necessary dialog1 is shown. In dialog1 there is a form and a command button. The command button in dialog1 is clicked, the bean method looks something up in the database. Dialog1 is closed and dialog2 , depending on the result of the bean method, is shown. bean1.java: public void buttonClicked() { Map<String, Object>

Primefaces Dialog Framework - Open dialog - close it - open another dialog

那年仲夏 提交于 2019-12-23 14:51:19
问题 Primefaces 5.0, JSF 2.2, Wildfly 8.1 The following use case: Click a command button in a view (with some parameters) The bean method looks something up in the database - if necessary dialog1 is shown. In dialog1 there is a form and a command button. The command button in dialog1 is clicked, the bean method looks something up in the database. Dialog1 is closed and dialog2 , depending on the result of the bean method, is shown. bean1.java: public void buttonClicked() { Map<String, Object>

Creating TimePickerDialog with custom style in Android

萝らか妹 提交于 2019-12-23 12:53:24
问题 I'd like to create a DialogFragment or a Dialog with a TimePicker inside, just like in the following image. The problem is that my application is using the Holo.Light theme and then from there, I'm customizing it, but I can't find anything related to TimePicker . Is it possible to assign a custom style to a TimePicker ? I haven't found anything in the official Android documentation. The following image is what I got so far, but still the TimePicker isn't in the color I want (it's the same

Using an icon on a dialog box window C++ Win32 API

倾然丶 夕夏残阳落幕 提交于 2019-12-23 09:57:02
问题 I am trying to create a dialog box with an icon at the top like so. I am using a resource file to load the icon like so. IDI_ICON1 ICON ".\\usb.ico" I have tried setting the window icon using the following code. SendMessage(hwnd, WM_SETICON, ICON_SMALL, (LPARAM)IDI_ICON1); SendMessage(hwnd, WM_SETICON, ICON_BIG, (LPARAM)IDI_ICON1); hwnd is the window. As a result, I get a blue circle that looks just like the loading icon for Windows 7 and Vista. I am almost positive the icon is being loaded

How to style buttons in Alert Dialog Fragment using Material Design?

白昼怎懂夜的黑 提交于 2019-12-23 09:48:49
问题 I'd like to change the default button styling on an alert dialog. The standard Alert Dialog Fragment (in Android L) looks like this: I'd like the right button to be styled as a normal button instead of a borderless button. Google itself seems to use this pattern in various dialogs, such as: Does anyone know if this is possible, without recreating the whole dialog from scratch? 回答1: You can style the button in the theme with attributes: android:buttonBarPositiveButtonStyle , android

Android custom dialog height

半腔热情 提交于 2019-12-23 09:35:31
问题 I'm learning about Android dialogs and I'm confused about what determines their height. If I use this XML for my dialog layout . . . <?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="wrap_content" android:layout_height="wrap_content"> <Button android:id="@+id/AButton" android:layout_height="wrap_content" android:layout_width="wrap_content" android:layout_alignParentRight="true" android:layout_marginLeft=

Using final 1-element array for anonymous inner class

一个人想着一个人 提交于 2019-12-23 09:16:22
问题 I stumbled across this trick for getting a value from an anonymous inner class to a variable which is declared in the outer class. It works, but it feels like a dirty hack: private int showDialog() { final int[] myValue = new int[1]; JPanel panel = new JPanel(); final JDialog dialog = new JDialog(mainWindow, "Hit the button", true); dialog.setDefaultCloseOperation( WindowConstants.DO_NOTHING_ON_CLOSE ); JButton button = new JButton("Hit me!"); button.addActionListener(new ActionListener() {

android custom Dialog with Button onClick event

百般思念 提交于 2019-12-23 07:59:27
问题 i have CustomDialog.java like this : public class CustomDialog { Dialog dl; public void ShowDialog(Context context, String message) { dl = new Dialog(context); dl.setContentView(R.layout.custom_dialog); TextView tv_message = (TextView) dl.findViewById(R.id.textViewMessage); tv_message.setText(message); Button bt_yes = (Button)dl.findViewById(R.id.buttonYes); Button bt_no = (Button)dl.findViewById(R.id.buttonNo); bt_yes.setOnClickListener(new View.OnClickListener() { @Override public void

CommonOpenFileDialog cause Windows Form to shrink

随声附和 提交于 2019-12-23 07:28:33
问题 I've been working on a Windows Forms application, and have recently added a simple settings page that allows the user to select a folder for where the output goes. The OpenFileDialog is ugly and not nice to use, so I've added in the WindowsAPICodePack to get access to the CommonOpenFileDialog - all good there. When I open the CommonOpenFileDialog , the Windows form application shrinks to a smaller size, as shown in the image attached. On the left is the program normally, on the right is with

CommonOpenFileDialog cause Windows Form to shrink

泪湿孤枕 提交于 2019-12-23 07:28:09
问题 I've been working on a Windows Forms application, and have recently added a simple settings page that allows the user to select a folder for where the output goes. The OpenFileDialog is ugly and not nice to use, so I've added in the WindowsAPICodePack to get access to the CommonOpenFileDialog - all good there. When I open the CommonOpenFileDialog , the Windows form application shrinks to a smaller size, as shown in the image attached. On the left is the program normally, on the right is with