how to select a menu item in menu bar using eggplant - eggplant

I recently started working on eggplant tool. In one of the screen I have Menu bars like File, View, help etc., Each menu bars contains menu items. some time I have to select the first menu item in menu bar and sometimes I have to select the other menu item in menu bar.
How to select a menu item in menu bar.
Could someone pls reply if anyone has an answer.

You can use shortcuts or hotkeys on the menu items.
For example: to reach "About" menu item in the expamle.
typeText altKey&H
typeText A
If you don't have any hotkeys.
You can search for the image "Help" and click then use downArrow
WaitFor 10, "helpButtonImage"
Click FoundImageLocation()
typeText downArrow,downArrow,return

We can do this by building search rectangle with a reference image

Related

Find the grid on which the context menu item is clicked on

I have a grid panel and i have a item context menu on it, which have sub items as well. When a user clicks on the sub menu item or context menu item, i want to know on which grid panel this context menu is on. Can i do this?
Use the add method to add the menu to the corresponding grid, and then later, you can get the grid using the up method.

DropDown menu in uinavigationbar

Any thoughts about a dropdown menu in the navigation bar in iOS like the one shown in these pictures?
dropdown closed image
dropdown opened image
here is what I was using (I am not an author).
https://github.com/nmattisson/DropdownMenu
and another one
https://github.com/eternityz/RWDropdownMenu

prevent popup menu of parent control from showing

I assigned a popup menu to the TPageControl because I want to display it when I rightclick a tab.
So that works...
Unfortunately it also shows the popup menu when I right-click within the actual tab sheet.
This I do not want because my ListBox1 in the tab sheet responds to a right-click to execute some code.
So right now it's a mess, the code fires upon rightclick of the listbox but also then displays a popup menu.
How can I nullify this popup menu in the tabsheet or at least within the listbox itself?
ok, Handled := True; was all that was needed in the popup event of the listbox. Thanks Rufo for pointing me in the right direction.

Cannot detect Frontpage properly in Joomla 2.5 templates

I've seen in Joomla documentation the way to detect if you are in Frontpage while creating a template in Joomla 2.5. This is the code:
<?php
$app = JFactory::getApplication();
$menu = $app->getMenu();
if ($menu->getActive() == $menu->getDefault()) {
echo 'This is the front page';
}
?>
This works when you are at home page (or clicking on Home menu), but I have an slider in home page, and I link in the slider to an article which is not in any menu item in the application. When I load this article the code above returns as I were at frontpage. I guess that if I doesn't click on any menu item, $menu->getActive() doesn't change.
Any suggestion?
Thanks in advance.
You can do one thing to solve this problem. Create a hidden menu of all the article links which are linked in the sliders.By creating hidden menu the link will be initialized and $menu->getActive() will work for all the links..Hopefully it will works for you .
I wish to add to the present answer and provide some clarifications.
In order for the menu selection to be detected the page requires to be assigned to a menu item. If this is a hidden menu than the link to such a page called My Page would be:
/index.php/my-page - “my-page” is the menu title alias for this item
However, if one wants to show the correct hierarchy in the breadcrumbs for the same page, then the menu hierarchy would have to be replicated in the hidden menu.
For example if My Page is under My Articles main menu item, then in the hidden menu you should add “My Articles” item, of the type: Menu Item Alias, which is in the Systems submenu of the menu type field. The My Page item should be a sub-menu item of My Articles.
The “My Articles” menu item in the hidden menu must have a different menu alias than the same one in the main menu hence the new link to My Page would look like:
/index.php/my-articles2/my-page
To create a hidden menu, one simply creates another menu. It does not matter whether one creates a module for it or not, but if one does then one just should not assign any position to that module.

Why doesn't clicking on my TToolButton show the DropdownMenu?

I'm using Delphi 2010 and I have a TToolButton contained by a TToolBar. Assigned to the 'DropdownMenu' property of my TToolButton is a standard TPopupMenu.
The only way I can get the menu to appear is to click on the area pointed to by the red arrow in the image. Currently, clicking the area pointed to by the green arrow shows the button as pressed, but the dropdown menu does not appear.
What I want is if the user clicks anywhere (pointed to by green arrow or red arrow) for the menu to appear. Is it possible to enable this functionality?
The idea of the tbsDropDown style is to have a button that triggers some default action when clicked, but provides more variations of that action in the drop down menu.
If you don't care about the down arrow disappearing, you can set the style to tbsButton and no matter where the button is clicked, it will show the popup menu.
If you are like me and you do want to have the arrow there to indicate that there are more options behind this button, you can call CheckMenuDropdown in the button's OnClicked event handler.
Set Style to tbsButton. Then you can click anywhere to show the drop-down menu, but you will lose the arrow.

Resources