menubar

GWT MenuItem loses focus after selection

自闭症网瘾萝莉.ら 提交于 2019-12-11 01:18:02
问题 I have a simple vertical one-dimensional menu. Menu items are not fix, they change dynamically according to data received from the server. (So I cannot write fix code for them.) In css I declared selected MenuItem to be bold. My wish is simply to make the selected MenuItem remain bold after selection. But when I click it, it loses focus and the first MenuItem becomes bold. How could that be fixed? 来源: https://stackoverflow.com/questions/14455796/gwt-menuitem-loses-focus-after-selection

SWT Actions with Keyboard Shortcuts… without having to add them to the menu

女生的网名这么多〃 提交于 2019-12-10 17:42:07
问题 We currently have implemented a lot of SWT Actions, because it is a nice way to bind a single command to be added to the menubars and toolbars, and to have Keyboard Shortcuts for these commands. Now... how can I register an Action in plain SWT/JFace without having to add it to a menubar, but in a way that it still can be called by a keyboard shortcut? 回答1: I use to solve this in plain SWT by using Display.addFilter on the KeyDown event. See this question for an example. 回答2: Use the org

How do I prevent menu and toolbar clicks stealing focus from a floating form?

回眸只為那壹抹淺笑 提交于 2019-12-10 16:44:09
问题 I want to achieve the same effect as in Visual Studio 2010+, where if you float an editor on top of the main form, clicking on a main form menu or toolbar button doesn't cause the main form to steal focus; instead the floating window retains focus. Without this it becomes impossible to invoke any main menu command that operates on a focused control when the focused control is in a floating window - because the control you wanted to operate on loses focus just as the command is invoked.

Programatically enable/disable menuBar buttons in Flex 4

我是研究僧i 提交于 2019-12-10 16:38:31
问题 I have the following XML in my Flex4 (AIR) project that defines the start of my menu interface: <mx:MenuBar x="0" y="0" width="100%" id="myMenuBar" labelField="@label" itemClick="menuChange(event)"> <mx:dataProvider> <s:XMLListCollection> <fx:XMLList xmlns=""> <menu label="File"> <item label="New"/> <item label="Load"/> <item label="Save" enabled="false"/> </menu> <menu label="Help"> <item label="About"/> </menu> </fx:XMLList> </s:XMLListCollection> </mx:dataProvider> </mx:MenuBar> I am

Detect if menu bar is hidden or visible

大憨熊 提交于 2019-12-10 15:16:33
问题 Is there a way in Cocoa to receive a notification (or something similar) when the menu bar becomes hidden or visible? I tried looking around and have not found any information on this topic. Thanks 回答1: I solved this by using Carbon's menu event handlers. I registered for events kEventMenuBarHidden and kEventMenuBarShown under the class kEventClassMenu . 回答2: Optionally watch out for (Cocoa) notifications for an object of class NSStatusBarWindow and notifications like

MenuBar issue QT 4.7.4 on MAC OS LION

こ雲淡風輕ζ 提交于 2019-12-10 13:17:21
问题 I'm new to QT programming. I want to create a simple menubar with two menus , and several actions (3 actions for FILE menu and one action for VIEW menu).I have createMenus() method where i create those menus and actions then I add created menus to menubar ,but when i run the app , it's not showing this menubar , and i dont know why. Can anyone tell what the problem is ? Source code of MainWindow.cpp #include <QtGui> #include <QAction> #include "MainWindow.h" MainWindow::MainWindow() { //

take device snapshot programmatically in android

倾然丶 夕夏残阳落幕 提交于 2019-12-09 23:45:31
问题 How can I take snapshot of device like this tablet has button in menu bar to take a snap shot of device screen? the device has android 4.1.1 this same functionality is wanted to implement in my application to capture the screen snapshot. note that: I don't want to use Layout.getDrawingCache(); I only want to access this method as the OS uses.or a solution like this I do not need to root device.so please do not provide root solutions 回答1: just have a look on this https://code.google.com/p

Missing menuBar in PyQt5

蹲街弑〆低调 提交于 2019-12-08 19:13:43
问题 I've been developing a GUI using PyQt5 and wanted to include a menu bar. When I went to code this feature, however, my menu wouldn't appear. Figuring my understanding on how to implement menu bars in PyQt5 was off, I looked for a pre-existing example online. With some tweaking I developed the following test case: import sys from PyQt5.QtGui import QIcon from PyQt5.QtWidgets import QApplication, QMainWindow, QMenuBar, QAction, qApp class Example(QMainWindow): def __init__(self): super().__init

Primefaces : how to create <p:menubar> dynamically in primefaces 4?

荒凉一梦 提交于 2019-12-08 11:17:05
问题 i'm migrating from primefaces 3.4 to primfaces 4.I had the menubar created dinamically in primefaces 3.4 with no probleme. here is the bean: public MenuBean() { MenuItem menuItem = new MenuItem(); Submenu submenu = new Submenu(); submenu.setLabel("Nos Solutions"); menuItem.setValue("Computers"); menuItem.setUrl("#"); submenu.getChildren().add(menuItem); menuItem = new MenuItem(); menuItem.setValue("Clothes"); menuItem.setUrl("#"); submenu.getChildren().add(menuItem); simpleMenuModel

Div within li not expanding

痴心易碎 提交于 2019-12-08 09:48:32
问题 I have a horizontal menu that is built with an unordered list. On mouseover of one of the list items a submenu will show that is contained within a div. In the submenu while the content displays correctly the div itself is constrained to the width of the parent list item. This results in content overflowing to the right of the div. How can I make it so that div expands with it's content. HTML & CSS on JSFiddle HTML: <div> <ul class="menu"> <li class="menuTab menuTabFirst"> Menu Bar Item 1