lwuit
  1. lwuit
  2. LWUIT-472

Vertical scroll bar width not used in MenuBar

    Details

    • Type: Bug Bug
    • Status: Open
    • Priority: Minor Minor
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None
    • Environment:

      J2ME

      Description

      When a menubar includes more items then possible to show, of course the menubar gets scrollable. Unfortunately the showMenuDialog(Dialog menu) does not take the Look and Feels vertical scroll width into account.

      The result is that the vertical scrollbar overlaps the text.

      I patched this behaviour with inheriting MyMenuBar from MenuBar, overriding showMenuDialog() and returning it in MyLookAndFeel:

      MyMenuBar.java
      	protected Command showMenuDialog(Dialog menu) {
      		...
      		// this is a workaround to overcome missing scroll bar width calculation
      		menu.getDialogComponent().setPreferredW( //
      				menu.getDialogComponent().getPreferredW() + UIManager.getInstance().getLookAndFeel().getVerticalScrollWidth());
      		...
      		return super.showMenuDialog(menu);
      	}
      

      The scrollbar width should be done in MenuBar.showMenuDialog(Dialog menu).

        Activity

        Hide
        RehamH added a comment -

        can i remove some commands from the menu dialog , using the same way?

        Show
        RehamH added a comment - can i remove some commands from the menu dialog , using the same way?

          People

          • Assignee:
            Unassigned
            Reporter:
            benefiz
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated: