Hello,
I have a menu and the following works GREAT, but only IF I use it at the top level. If I make a submenu then the MenuItemStringFunction does not fire. I was hoping to change the title on the submenus, why does this not work?
Thanks,
Evan
startsSearchItem.addClickHandler(startsSearchClickHandler);
startsSearchItem.setIcon("text_align_left.png");
final String strTitleStartsSearch = "Prefix (starts with)";
startsSearchItem.setTitle(strTitleStartsSearch);
MenuItemStringFunction startsMenuItemStringFunction = new MenuItemStringFunction() {
@Override
public String execute(Canvas target, Menu menu, MenuItem item) {
return getMenuItemOperatorTitle(OperatorId.ISTARTS_WITH, strTitleStartsSearch);
}
};
startsSearchItem.setDynamicTitleFunction(startsMenuItemStringFunction);
I have a menu and the following works GREAT, but only IF I use it at the top level. If I make a submenu then the MenuItemStringFunction does not fire. I was hoping to change the title on the submenus, why does this not work?
Thanks,
Evan
startsSearchItem.addClickHandler(startsSearchClickHandler);
startsSearchItem.setIcon("text_align_left.png");
final String strTitleStartsSearch = "Prefix (starts with)";
startsSearchItem.setTitle(strTitleStartsSearch);
MenuItemStringFunction startsMenuItemStringFunction = new MenuItemStringFunction() {
@Override
public String execute(Canvas target, Menu menu, MenuItem item) {
return getMenuItemOperatorTitle(OperatorId.ISTARTS_WITH, strTitleStartsSearch);
}
};
startsSearchItem.setDynamicTitleFunction(startsMenuItemStringFunction);
Comment