popupmenu

QTreeWidget right click menu

我只是一个虾纸丫 提交于 2019-12-02 22:39:06
I looked around and it seems that the problem is present not only for tree widget but also for other widgets. But in my case, I found a solution, although an incomplete one. I am adding actions to my tree widget, so that when you right click on it, a popup with these actions appears. However, when I add items to my tree widget and I right click on them, the same popup appears. What I would like to do is that when you right click on the tree widget, a tree widget popup menu appears and when you right click on items, another corresponding popup menu appears. Does anybody knows how to do this?

Xcode - How to make a pop up menu [closed]

China☆狼群 提交于 2019-12-02 19:49:57
I would like to make a pop up menu in Xcode. How can I do it? I would like it to look nice and professional. Thank you! Here is an example of using UIActionSheet to present a popup menu in a UITextView in response to a longPress on an attachment. - (void)attachmentActionSheet:(UITextView *)textView range:(NSRange)range { // get the rect for the selected attachment (if its a big image with top not visible the action sheet // will be positioned above the top limit of the UITextView // Need to add code to adjust for this. CGRect attachmentRect = [self frameOfTextRange:range inTextView:textView];

What's the name of the little widget with three dots inside a cardview in android?

时光怂恿深爱的人放手 提交于 2019-12-02 15:31:07
What's the little widget with three dots? How can I add it to my app? kandroidj This is not a widget at all. It is an ImageButton (borderless in style) using the overflow Icon that includes a PopupMenu For documentation tutorial visits http://developer.android.com/guide/topics/ui/menus.html#PopupMenu This refers to a nice code snippet from the link above: <ImageButton android:layout_width="wrap_content" android:layout_height="wrap_content" android:src="@drawable/ic_overflow_holo_dark" android:contentDescription="@string/descr_overflow_button" android:onClick="showPopup" /> Then use to show

How to create a popup menu in visual basic.net?

僤鯓⒐⒋嵵緔 提交于 2019-12-02 06:30:49
How can I create a popup menu in vb 2008 for use as a context sensitive menu for when I right-click? First, create the context menu using the ContextMenuStrip control. Then assign that ContextMenuStrip to the ContextMenuStrip property of the form or control you want to use the context menu with. There's a context menu located in the Components section of the Toolbox. You can then link this context menu to the appropriate control(s) in the Properties section of the control in the Design View. 来源: https://stackoverflow.com/questions/1723327/how-to-create-a-popup-menu-in-visual-basic-net

PopupMenu Item Icons

*爱你&永不变心* 提交于 2019-12-01 09:38:25
I have a problem with my app. I need to show a PopupMenu and I need every item in this menu to contain text and an image. The images should be displayed to the left of the text. But it is not showing, any suggestions how to make it happen? My code so far below; public void showMenu(Button button) { PopupMenu popupMenu = new PopupMenu(this, button); popupMenu.getMenuInflater().inflate(R.menu.config_menu, popupMenu.getMenu()); popupMenu.setOnMenuItemClickListener(new PopupMenu.OnMenuItemClickListener() { @Override public boolean onMenuItemClick(MenuItem menuItem) { switch (menuItem.getItemId())

RuntimeException: Binary XML file line #17: You must supply a layout_height attribute whie showing the popupmenu

限于喜欢 提交于 2019-12-01 05:55:37
public void showPopup(int group,int img_index,JSONArray json_ar,View v){ PopupMenu pm=new PopupMenu(EditPhotosActivity.this,v); pm.getMenuInflater().inflate(R.menu.popup_menu, pm.getMenu()); pm.setOnMenuItemClickListener(new PopupMenu.OnMenuItemClickListener() { @Override public boolean onMenuItemClick(MenuItem item) { Toast.makeText(getBaseContext(),"You Clicked : " + item.getTitle(),Toast.LENGTH_SHORT).show(); return false; } }); pm.show(); } The showPopup method is being called by an onclick of dynamically created Imagevew. App is getting crashed while executing pm.show() . This is the

Popup menu divider for App compat theme

℡╲_俬逩灬. 提交于 2019-12-01 04:50:02
问题 I used app compat theme style . <style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar"> <!-- Customize your theme here. --> <item name="android:popupMenuStyle">@style/PopupMenu</item> <item name="android:itemTextAppearance">@style/myCustomMenuTextApearance</item> <item name="android:listPopupWindowStyle">@style/PopupMenuStyle</item> </style> <style name="PopupMenuStyle" parent="Widget.AppCompat.ListPopupWindow"> <item name="android:divider">@drawable/devider</item> <item name=

RuntimeException: Binary XML file line #17: You must supply a layout_height attribute whie showing the popupmenu

限于喜欢 提交于 2019-12-01 03:45:18
问题 public void showPopup(int group,int img_index,JSONArray json_ar,View v){ PopupMenu pm=new PopupMenu(EditPhotosActivity.this,v); pm.getMenuInflater().inflate(R.menu.popup_menu, pm.getMenu()); pm.setOnMenuItemClickListener(new PopupMenu.OnMenuItemClickListener() { @Override public boolean onMenuItemClick(MenuItem item) { Toast.makeText(getBaseContext(),"You Clicked : " + item.getTitle(),Toast.LENGTH_SHORT).show(); return false; } }); pm.show(); } The showPopup method is being called by an

When should I use a ellipsis in a Menu Item

淺唱寂寞╮ 提交于 2019-12-01 03:14:20
When should I put ... at the end of a menu item? I seem to remember reading some rules but can't for the life of me find them. For context - I'm adding a properties option to a right click menu and am wondering if it is appropriate to add them. One exception to the first two answers: if the whole point of the menu command is to open a window or dialog, then you don't need an ellipsis. For example, a "Get Info" or "Properties" command shouldn't have it, even though it's opening a window which lets you edit things. It's only when the menu command's purpose is to do something else, but it needs a

Android popupmenu position

有些话、适合烂在心里 提交于 2019-12-01 03:11:24
I am trying make an android app where clicking a button raises a popupmenu . The popupmenu is being generated but not at the correct position. The code is as follows: menu.xml <?xml version="1.0" encoding="utf-8"?> <menu xmlns:android="http://schemas.android.com/apk/res/android"> <group android:checkableBehavior="single"> <item android:id="@+id/genderMale" android:title="Male" /> <item android:id="@+id/genderFemale" android:title="Female" /> </group> </menu> The function to execute the popup is as follows: public void showGenderPopup(View v) { PopupMenu popup = new PopupMenu(this, v);