popupmenu

How to set a custom color for the popup of action items, including of the overflow menu?

∥☆過路亽.° 提交于 2019-12-10 09:58:59
问题 Background I'm working on adding some material design style for an app, so I've chosen a different color for the action bar and status bar. The problem For this, the theme of the app is of "Theme.AppCompat.Light.DarkActionBar", and added this to hide the action bar as I need to handle it as a toolbar: theme I've used: <style name="AppTheme" parent="@style/Theme.AppCompat.Light.DarkActionBar"> <item name="windowActionBar">false</item> <item name="windowNoTitle">true</item> <item name=

How to create a button with drop-down menu?

放肆的年华 提交于 2019-12-10 04:24:54
问题 Is there a way to show IE/Firefox Back button style, dropdown menu button? 回答1: I am assuming you mean a button that drops down a menu when clicked. You can also just manually code your button click to drop down a TPopupMenu under it. Example : Drop anything with a TClickEvent (maybe a TButton) and a TPopupMenu on your form. Add some menu items. Then add the following OnClick event handler: procedure TForm86.Button1Click(Sender: TObject); var button: TControl; lowerLeft: TPoint; begin if

Set Popup menu to full screen

被刻印的时光 ゝ 提交于 2019-12-10 01:48:13
问题 Note : This is popup menu not popup window.So I request you all to read carefully. I have implemented pop menu. It is displaying in half of the screen. I want to spread this to entire width of device. I tried to change its style by setting layout_width as match_parent but with no success. Below is what I tried so far: Style <!-- Base application theme. --> <style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar"> <!-- Customize your theme here. --> <item name="popupMenuStyle">

MenuPopupHelper cannot be used without an anchor

三世轮回 提交于 2019-12-08 17:37:47
问题 I want add PopupMenu to my MenuItem . Menu.xml <?xml version="1.0" encoding="utf-8"?> <menu xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto"> <item android:id="@+id/date" app:showAsAction="ifRoom|withText" android:title="Date" android:visible="true"/> <item android:id="@+id/category" app:showAsAction="ifRoom|withText" android:title="Category" android:visible="true"/> </menu> When I click on MenuItem I call this code: @Override

How to attach context menu to TChromium browser

▼魔方 西西 提交于 2019-12-07 06:27:02
问题 I have a TChromium broser from Delphi Chromium Embedded (http://code.google.com/p/delphichromiumembedded). I would like to attach a context menu to it. How I can achieve that? 回答1: You need to handle the OnBeforeMenu event. In that event handler is enough to set the output parameter Result to True what will suppress the default context menus to popup. After that you can display your own menu on the positions obtained from the menuInfo structure. Here's the code sample with a custom popup menu

How can I edit the dimensions of a PopUp Menu Item in Android?

偶尔善良 提交于 2019-12-07 05:39:41
问题 I have a PopUp Menu that drops down when I click a button. However I feel the items in this menu don't look good with respect to the overall view of my App. I was wondering if I could edit the dimensions of the items in the Menu. Maybe make the height of each item shorter, if possible. PopupMenu popup = new PopupMenu(this, settingsButton); MenuInflater inflater = popup.getMenuInflater(); inflater.inflate(R.menu.settings_menu, popup.getMenu()); Then in the onClick() method of the button I call

Android Custom Popup menu with switch

十年热恋 提交于 2019-12-07 01:30:43
问题 How can I customize the menuItems in a popup menu? I need a switch for the first menuitem. Here is what I got so far: menu.xml <menu xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tools="http://schemas.android.com/tools" tools:context="android.oli.com.fitnessapp.activities.LiveSelectActivity"> <item android:icon="@drawable/ic_access_alarm_white_24dp" android:orderInCategory="100" app:showAsAction="always" android:visible=

How to set popup menu for ListView header bar together with items popup menu?

梦想的初衷 提交于 2019-12-07 01:27:37
问题 I have a ListView with ViewStyle = vsReport and two popup menus: Column popup menu , which I want to open when user right-clicking the header bar Item popup menu , must open when the user right-clicking any list item/subitem or whitespace below items. What is the most correct way to show that menus? Which events should I handle? The problem is when I set ListView.PopupMenu property, the popup menu appearing after right-clicking any point in ListView's client rectangle. When I handle ListView

JComboBox popup menu not appearing

微笑、不失礼 提交于 2019-12-06 08:56:44
I have a JComboBox inside a JPanel (which itself is nested within a few other JPanels). It's populated with members of an enum. I'm running into a problem where the popup menu doesn't appear when I click the expand button. Here's the information I've gathered so far: 1) The first click on the expand button does nothing. The second click highlights the contents of the box, but the popup still doesn't appear. 2) Once I've clicked the button and given it focus, up/down keystrokes cycle through the entries correctly. 3) I've tried adding a PopupMenuListener to print out events, and the events fire

Issue with differentiating between two of the same items in a tkinter menu

为君一笑 提交于 2019-12-06 08:03:05
问题 The program I created allows for any letter on the keyboard the user types to be written on the turtle graphics canvas. In my program, I have also created a Python menu to which a Point object (for each letter function) is written to every time a user executes a function/draws a letter. However, because of the nature of my program, the user can also attach two of the same functions to the menu. If two of the same things get attached to the menu, for example two functions, I need a way to