Hi Isomorphic,
can you add a sample with a ListGrid + long context menu?
I'm doing menus like this:
in order to display the menu at the click position, there is setLeft()/setTop().
These result, if the click is in the lower part of the screen and the menu is long in white space below the application, just to show the menu.
![Click image for larger version
Name: ListGrid Contextmenu.png
Views: 116
Size: 29.6 KB
ID: 255056](filedata/fetch?id=255056&d=1536920638)
The empty space is just there on right click and shifts the application up. It returns to normal when the menu is hidden.
Is this expected? Am I somehow responsible to compute the position myself or is there a way to have this automatic fit by auto positioning it?
Thank you & Best regards
Blama
can you add a sample with a ListGrid + long context menu?
I'm doing menus like this:
Code:
addRowContextClickHandler(new RowContextClickHandler() { @Override public void onRowContextClick(RowContextClickEvent event) { event.cancel(); final ListGridRecord[] records = getSelectedRecords(); if (records.length == 1) { Menu menu = new Menu(); menu.addItemClickHandler(new ItemClickHandler() { @Override public void onItemClick(ItemClickEvent event) { //... //... //... //... } }); menu.setItems([B]....many items...[/B]); menu.[B]setLeft(event.getX());[/B] menu.[B]setTop(event.getY());[/B] menu.draw(); } } });
These result, if the click is in the lower part of the screen and the menu is long in white space below the application, just to show the menu.
The empty space is just there on right click and shifts the application up. It returns to normal when the menu is hidden.
Is this expected? Am I somehow responsible to compute the position myself or is there a way to have this automatic fit by auto positioning it?
Thank you & Best regards
Blama
Comment