dialog

how to set a custom list view into a dialog box

两盒软妹~` 提交于 2019-12-31 02:05:27
问题 I am developing a application which fetches some data from a web service and displays in a list view. I have implemented a custom adapter which is extended by BaseAdapter. In the getView() method I inflate the raw also.. Those are working perfectly. My problem is I have implemented code to show a dialog box when user click on an list item, but now I want to show another dialog box which has a custom list inside it (when Yes button clicked). I also want to show some data in that listview. [I

DialogResult.OK on SaveFileDialog not work

别等时光非礼了梦想. 提交于 2019-12-30 22:56:06
问题 I try, when I press save in SaveFileDialog I do something. I trying fix but always something wrong. SaveFileDialog dlg2 = new SaveFileDialog(); dlg2.Filter = "xml | *.xml"; dlg2.DefaultExt = "xml"; dlg2.ShowDialog(); if (dlg2.ShowDialog() == DialogResult.OK) {....} But I have error on OK - which say: Error: 'System.Nullable' does not contain a definition for 'OK' and no extension method 'OK' accepting a first argument of type 'System.Nullable' could be found (are you missing a using directive

Python 消息框的处理

佐手、 提交于 2019-12-30 14:25:50
在实际系统中,在完成某些操作时会弹出对话框来提示,主要分为"警告消息框","确认消息框","提示消息对话"三种类型的对话框。 1.警告消息框(alert)   警告消息框提供了一个"确定"按钮让用户关闭该消息框,并且该消息框是模式对话框,也就是说用户必须先关闭该消息框然后才能继续进行操作。 2.确认消息框(confirm)   确认消息框向用户提示一个"是与否"问题,用户可以根据选择"确定"按钮和"取消"按钮。 3.提示消息对话(prompt)   提示消息框提供了一个文本字段,用户可以在此字段输入一个答案来响应您的提示。该消息框有一个"确定"按钮和一个"取消"按钮。选择"确认"会响应对应的提示信息,选择"取消"会关闭对话框。 selenium 提供switch_to_alert()方法定位到 alert/confirm/prompt对话框。使用 text/accept/dismiss/send_keys 进行操作,这里注意的是send_keys只能对prompt进行操作。 switch_to_alert()   #定位弹出对话 text()    #获取对话框文本值 accept() #相当于点击"确认" dismiss() #相当于点击"取消" send_keys() # 输入值,这个alert和confirm没有输入对话框,所以这里就不能用了

Qt5 托盘模仿qq闪烁,弹消息框实现

落爺英雄遲暮 提交于 2019-12-30 14:02:43
在别人代码基础上做的,课设刚好用上了,贴出来分享Qt5.5.1实现。 图片自己找。 #ifndef DIALOG_H #define DIALOG_H #include <QDialog> #include <QTimer> #include <QMenu> #include <QCloseEvent> #include <QMessageBox> #include <QSystemTrayIcon> namespace Ui { class Dialog; } class Dialog : public QDialog { Q_OBJECT public: Dialog(QWidget *parent = 0); ~Dialog(); void InitUi(); void InitTray(); //初始化托盘 void InitLayout(); void closeEvent(QCloseEvent *); //在关闭窗口时候要重写该函数,为了最小化到托盘,而不是退出程序 void ShowMessageBox(); //像是托盘图表的messagebox(); protected: void changeEvent(QEvent *e); private: Ui::Dialog *ui; QSystemTrayIcon *tray; QTimer *timer; /

how to add the selected files from dialog window to a dictionary?

时光毁灭记忆、已成空白 提交于 2019-12-30 12:04:28
问题 I wish it's able to open a dialog window and select my files, a.txt b.txt then add them in my dictionary myDict = { "a.txt" : 0, "b.txt" : 1} I searched on website import Tkinter,tkFileDialog root = Tkinter.Tk() filez = tkFileDialog.askopenfilenames(parent=root,multiple='multiple',title='Choose a file') these codes work for opening a dialog window and selecting my files. But the question is how to add the selected files to the dictionary? With Stephan's answer, the problem is solved myDict =

Z-index in jQuery dialog. Autosuggest list not displayed properly

时间秒杀一切 提交于 2019-12-30 11:00:19
问题 I have a problem displaying the autosuggest box inside a jQuery dialog. The auto suggest list is displayed under the dialog no matter what. I have tried setting up the z-index property of autosuggest to > 1004. But no luck. Below is the screenshot. This is the CSS class I have used to style the autosuggest list: ul.as-list { position: absolute; list-style-type: none; margin: 2px 0 0 0; padding: 0; font-size: 14px; color: #000; font-family: "Lucida Grande", arial, sans-serif; background-color:

Defining android activity as dialog with light theme

北战南征 提交于 2019-12-30 10:08:25
问题 In my application I am defining one android activity as dialog.It looks proper.Only problem with that is my dialog appear in dark theme. I want to display it into light theme. I defined my activity dialog in following manner : <activity android:theme="@android:style/Theme.DeviceDefault.Dialog.MinWidth" android:name="com.example.dialog" android:label="@string/title_activity_list" > </activity> How to do this. Any solution. Need Help. Thank you. 回答1: You need to use Holo Light Dialog theme:

Problems in Showmodal after assigning to Setparent(..)

江枫思渺然 提交于 2019-12-30 07:09:59
问题 I created two application MainApps and SubApps, the SubApps has a modal type dialogbox such as login/logout form etc. and its working fine. After I attach it to the MainApps, the Modal Dialog box shows like normal box form. It behaves like "DIALOG.SHOW" instead of "DIALOG.SHOWMODAL"; I am using delphi compiler SubApps buttonclick; begin with TfrmDialog.Create(Self, dtLogout) do try iMsgResult := ShowModal; finally Free; end; if iMsgResult = mrOk then begin dmVoca.FHomeworkXMLDoc.Active :=

JQuery Autocomplete close option when click outside

柔情痞子 提交于 2019-12-30 06:48:27
问题 I would like to know if there's a way in JQuery Autocomplete, when is open the options if I click OUTSIDE the options box to select or click ESCAPE in the keyboard. It closes, without having to select one option. Anyone know the correct way to do it? Still thought using something to check if focus the autocomplete , if not to close it but is just an a IDEA. Thanks 回答1: Just close the autocomplete when the dialog is closed: $("#dialog").dialog({ close: function() { $('#tags').autocomplete(

Primefaces - AjaxStatus - Dialog is behind the overlay

我怕爱的太早我们不能终老 提交于 2019-12-30 06:05:32
问题 I checked the z-index, but the Dialog z-index is higher than the div of overlay. It was to be correct. In the showcase works correctly. Could you help me with this problem? 回答1: Set appendToBody = true and your problem will go away - but be careful to have a form inside if you do some server-side processing. More info when you post more info! 回答2: For primefaces 5.1 you can use appendTo="@(body)" 来源: https://stackoverflow.com/questions/8434639/primefaces-ajaxstatus-dialog-is-behind-the