How to enable context menu on a VerticalHeaderItem inside a QTableWidget? - user-interface

I have QTable widget, where I set
setVerticalHeaderItem(0, QTableWidgetItem("some header", 0))
I set a contex menu by
setContextMenuPolicy(Qt.ActionsContextMenu)
and it works fine on my table's elements other than 1st column, i.e. a VerticalHeaderItem. Basically, when I right-click on 1st column item a context menu doesn't pop up, while clicking on any other elements >1st column causes the context menu to pop up (populated with the QActions I defined, not shown here for clarity).
Is there any attribute I should set in order to make 1st (VerticalHeaderItem) column react to right-click? Qt.ItemFlags maybe? If so, could anyone write a code snippet how to set it properly? Preferably in Python, but C++ would be also OK.
My conf: QT 4.5.2, PyQT 4.5.4, under Windows XP SP2.

The headers are widgets on their own. So, set the context menu policy on myTableWidget.verticalHeader().

Related

Custom drop-down as an item in a kendo tree

I am trying to create an item that is a button "show more" and when you press on it you can show a kind of context menu / drop down that all of the items in that drop down are with checkboxes and there is a search component in it too, so you can search some items in the dropdown by their name. For example: (instead of "c++,c#,Object c" it's should show "show more", i.e. static text)
I tried to use kendoContextMenu. But I don't know if it's could work because the problem with context menu is that when I will click on a checkbox the menu will close. Please advise me of a way to do that or if you have an example of code. Thanks!
The MultiSelect component might be a good starting point
https://docs.telerik.com/kendo-ui/api/javascript/ui/multiselect.
My understanding is that MultiSelect does not have a "select more than one at a time in dropdown" feature.
You might consider using a pop up window and within that implement your own custom ui that features everything you want
search term box
scrolling list of selected and selectable items
accept or cancel changes in selection
Regarding your dojo that extends drop down list, I can't code the extension for you. However, changing the dataSource assignment to a setDataSource call will populate the extension component according to the template.
// kendo.ui.DropDownList.fn.dataSource = options.testItemSource;
me.setDataSource(options.testItemSource);

Replace custom menu with Oracle Forms 11g default menu

In my main form window, I have the following menu bar which is used for traversing. Its inherited from .mmb file.
Now, when I select any form on the menu, lets suppose I selected the highlighted "Purchase Order", then I don't want the same menu to be shown. I want the Oracle Form 11g's default menu to be shown instead, picture added below for reference.
I changed form's property of Inherit menu to No and the menu from image 1 isn't shown in "Purchase Order" but I still am not getting the default&smartbar menu.
How can I achieve that?
Thank you.
So I figured out a way how to disable .mmx menu and enable DEFAULT&SMARTBAR menu when I go to another form through the menu.
From the first screenshot above, the on-click-trigger had the following code
call_form(:global.path||'pc');
I replaced it with
call_form(:global.path||'pc',hide,do_replace);
So the addition of
,hide,do_replace
worked.
Side note: Also, make sure Inherit Menu property of Window property is "YES" and Menu Module of form property is set to "DEFAULT&SMARTBAR"
I think in the properties window from the form you got the property "menu module"
If you make a new form it gets the default: DEFAULT&SMARTBAR
So I think it is now filled with your mmb filename.

Magento change menu style

Default menu of magneto, child items are showed in dropdown list.
I need to change them as submenu bellow main menu (as image).
I tried to change my source code at menu block. But It complex to change and very impact to other blocks.
Is there any other way to do?

Joomla 3.0 missing menu parameters

Has been some time till I last worked in Joomla (that was verion 1.5.x)
In Joomla 3.0 the Menu parameters seems to be missing. Adding the parameter helped identifying what menu item has been clicked. The problem I am having now is that if I use the same component for two different menu items in the main menu - it will basically do the same.
BEFORE (Example):
Menu Item (1) - Landscape pictures (Menu parameter is set to 1)
-> Calls com_picturegallery
-> See's that parameter is ONE and select statement of component filters for all landscape pictures.
Menu Item (2) - Urban pictures (Menu parameter is set to 2)
-> Calls com_picturegallery
-> See's that parameter is TWO and select statement of component filters for all urban pictures.
In Joomla 3.0 i cannot find an option to set these parameters in the menu settings for main menu.
Does anyone know how else to tell Joomla that depending on menu I click the component has to do a specific task.
Thanks!
This is how it works - I suppose it has been also best practice in Joomla 1.5.x
$menu = JSite::getMenu();
$alias = $menu->getActive()->alias;

selenium - how to program using a select dropdown menu

I want to simulate the user clicking on a text field, using the dropdown and selecting an item.
I can get them on the field and the dropdown working with:
click //input[#id='select_students']
keyPress //input[#id='select_student'] \40
but I can't seem to get 'picking' an item in the dropdown.
I've tried using keyPress with Keys.ENTER as the value but I get forced to put in a Target (selenium IDE in firefox this is) and I don't know what to use as the target.
I could use something that press Enter regardless regardless of target if it's available.
Below logic might be useful for you.
click css=select[id="select_students"]
select css=select[id="select_students"] label=student10
click css=option[value="student10"]

Resources