An optionmenu is a UI construct that presents the user with a list of options.
Questions tagged [optionmenu]
453 questions
13
votes
2 answers
Default to and select first item in Tkinter listbox
I want to automatically select the first item in the listbox. By selecting the first item, I don't mean simply defaulting to the first item or setting focus on it. I've already achieved that by doing self.listbox.select_set(0). I want the default…

sedeh
- 7,083
- 6
- 48
- 65
12
votes
5 answers
Setting content description for option menu android Talkback
I am implementing "Read Aloud" or "Talkback" for an app. Everything is working with contentDescription text, but with option menu, I found nothing related to contentDescription, I want system read "Menu "+ item's name.
EX: My menu has 2 items:…

NamNH
- 1,752
- 1
- 15
- 37
12
votes
2 answers
How do populate a Tkinter optionMenu with items in a list
"I want to populate option menus in Tkinter with items from various lists, how do i do that? In the code below it treats the entire list as one item in the menu. I tried to use a for statement to loop through the list but it only gave me the value…

kflaw
- 424
- 1
- 10
- 26
10
votes
2 answers
Cannot resolve method setHasOptionsMenu in android Activity
I try to used setHasOptionsMenu(true); in my activity but i get an error. "cannot resolve method setHasOptionsMenu".
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
…

byteC0de
- 5,153
- 5
- 33
- 66
9
votes
4 answers
Best practices for implementing a multi-level Option Menu on Android?
I'm currently working on a port of an iPhone app into an Android. The iPhone app has a custom global navigation menu at the bottom of the screen, and when bringing this over to Android, it was suggested to replace this custom menu with the generic…

Madhu
- 2,429
- 16
- 31
9
votes
4 answers
MenuPopupHelper cannot be used without an anchor
I want add PopupMenu to my MenuItem.
Menu.xml
9
votes
2 answers
Option Menu Animation
How can i give a slide down animation like this :
for " Option…

Mohammad Tazehkar
- 271
- 3
- 20
9
votes
1 answer
Clicking on a menu item in action bar with Espresso when using onView(withId(...))
I am making a test using Espresso, first I open the action bar:
openActionBarOverflowOrOptionsMenu(getInstrumentation().getTargetContext());
Everything ok up to here, but then I want to click on an option…

Romina Liuzzi
- 741
- 8
- 13
9
votes
1 answer
TKinter OptionMenu: How to get the selected choice?
I am quite new at Python and Tkinter, but I have to create a simple form which requires the use of drop-down menus.
I was trying to do something like this:
#!/usr/bin python
import sys
from Tkinter import *
# My frame for form
class…

Jackkilby
- 162
- 1
- 2
- 9
9
votes
2 answers
What is the difference between Option Menu and Panel Menu in Android?
I just created a Panel Menu by mistake with the auto-completion of Eclipse and did not realise it before I read my code. As I wanted to have an option menu, I didn't see the slight difference in the display so does anyone know what the difference(s)…

Sephy
- 50,022
- 30
- 123
- 131
8
votes
1 answer
Tkinter OptionMenu DisplayOptions and Assignment Values
In Python's Tkinter OptionMenu, is it possible to have a list of display options, but on selection, it sets a value to be some other value?
Suppose I had
variable = tk.IntVar(master)
OptionMenu(master, variable, 1, 2).pack()
options =…

Murphy4
- 1,499
- 2
- 15
- 22
8
votes
2 answers
Why ActionbarSharelock shows only overflow icon even there are room
I am stuck with Menu item visibility in ABS even there are room in header. Thing is I have test in different size of device but in each case i am able to see only one and that is Overflow menu.
I am using onPrepareOptionsMenu to manage my menu as…

Chintan Khetiya
- 15,962
- 9
- 47
- 85
7
votes
2 answers
Change text color of option menu when we use app:showAsAction="always"
I am using toolbar and use option for corresponding actions. My problem is this I want to show "SAVE" text on toolbar with white color, I apply many styles but it always appear as black. But when option appear as popup then text color is always…

Amarjit
- 4,327
- 2
- 34
- 51
7
votes
3 answers
Android: OptionMenu between Activity and Fragments
In my app I have one Activity that hosts two Fragments. If I add a MenuItem to the Menu can I retrive it in my fragments? What's the link between OptionMenu in Activity and OptionMenu in his child fragments?

TheModularMind
- 2,024
- 2
- 22
- 36
6
votes
3 answers
Fragment Option Menu Avoid Showing One Fragment Menu In another
I am Replacing 2 Fragments One After another, and both fragments have different option menus. When I replace 2nd fragment it is showing menus of 1st fragment also. setHasOptionMenu(true); has set in both fragments.
I want to show only that option…

Jogendra Gouda
- 405
- 4
- 17