[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[news.eclipse.platform.swt] Re: Line under the menu

Matthew Hall wrote:
Did you add this line yourself? If so, what layout is this container using?

No, i do not add this line.

If you didn't add the line yourself, I suspect it may have been added by a superclass such as ApplicationWindow or jface.dialogs.Dialog. Additional information would definitely help things down.

Well, i'm at work now, so i haven't the code here, but i have used ApplicationWindow indeed, and the menuitems are generated by overwriting the createMenuManager() method (decompiled code :-), not complete):


    public MenuManager createMenuManager()
    {
        MenuManager mManager = super.createMenuManager();
        MenuManager file = new MenuManager("File");
        file.add(new Action("Exit") {
            public void run()
            {
                reallyClose = true;
                shell.close();
            }
        });
        MenuManager options = new MenuManager("Options");
        startAction = new Action("Start", 8) {
            public void run()
            {
                start();
            }
        };
        options.add(startAction);
        options.add(new Separator());
        options.add(new Action("Preferences") {
        });
        MenuManager help = new MenuManager("Help");
        help.add(new Action("About") {
        });

        mManager.add(file);
        mManager.add(options);
        mManager.add(help);
        return mManager;
    }


So the line could be drawn by ApplicationWindow and the error is there?

regards
Jens