Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Scout » new title Menu in GroupBox
new title Menu in GroupBox [message #1824384] Tue, 14 April 2020 16:31 Go to next message
Oueslati Anis is currently offline Oueslati AnisFriend
Messages: 137
Registered: June 2014
Location: Paris
Senior Member
Hello,
I am testing the new feature of the menu in group box and I am not able to put the menu in right side of the title, it is always coming on left side near the title.
how to make it on right side ?
Thanks
Re: new title Menu in GroupBox [message #1824389 is a reply to message #1824384] Tue, 14 April 2020 17:03 Go to previous messageGo to next message
Beat Schwarzentrub is currently offline Beat SchwarzentrubFriend
Messages: 214
Registered: November 2010
Senior Member
  @Override
  protected byte getConfiguredHorizontalAlignment() {
    return HORIZONTAL_ALIGNMENT_RIGHT;
  }


Regards,
Beat
Re: new title Menu in GroupBox [message #1824393 is a reply to message #1824389] Tue, 14 April 2020 17:34 Go to previous messageGo to next message
Oueslati Anis is currently offline Oueslati AnisFriend
Messages: 137
Registered: June 2014
Location: Paris
Senior Member
it does not work, could you please send me a complete sample code that works to compare to my code
Re: new title Menu in GroupBox [message #1824431 is a reply to message #1824393] Wed, 15 April 2020 08:37 Go to previous messageGo to next message
Beat Schwarzentrub is currently offline Beat SchwarzentrubFriend
Messages: 214
Registered: November 2010
Senior Member
Yes, it does work.

public class MyGroupBox extends AbstractGroupBox {

  @Override
  protected String getConfiguredLabel() {
    return "Test";
  }

  @Override
  protected String getConfiguredMenuBarPosition() {
    return MENU_BAR_POSITION_TITLE;
  }

  // ...

  public class MyMenu extends AbstractMenu {
    
    @Override
    protected String getConfiguredText() {
      return "Click me";
    }

    @Override
    protected byte getConfiguredHorizontalAlignment() {
      return HORIZONTAL_ALIGNMENT_RIGHT;
    }
  }
}


Regards,
Beat
Re: new title Menu in GroupBox [message #1824466 is a reply to message #1824431] Wed, 15 April 2020 18:19 Go to previous messageGo to next message
Oueslati Anis is currently offline Oueslati AnisFriend
Messages: 137
Registered: June 2014
Location: Paris
Senior Member
Hello,
It is not working as expected

see image
Re: new title Menu in GroupBox [message #1824467 is a reply to message #1824384] Wed, 15 April 2020 18:21 Go to previous messageGo to next message
Oueslati Anis is currently offline Oueslati AnisFriend
Messages: 137
Registered: June 2014
Location: Paris
Senior Member
index.php/fa/37844/0/
Re: new title Menu in GroupBox [message #1824493 is a reply to message #1824466] Thu, 16 April 2020 08:40 Go to previous messageGo to next message
Beat Schwarzentrub is currently offline Beat SchwarzentrubFriend
Messages: 214
Registered: November 2010
Senior Member
I replicated your screen shot:
    @Order(1000)
    @ClassId("f7cc6f3c-c193-438f-9ba7-9d4fc66af54d")
    public class ConfigurationBox extends AbstractGroupBox {

      @Override
      protected String getConfiguredLabel() {
        return "Configuration";
      }

      @Override
      protected String getConfiguredMenuBarPosition() {
        return MENU_BAR_POSITION_TITLE;
      }

      @Order(1000)
      @ClassId("0f5fb5d4-25ac-45b7-8c05-041257feba83")
      public class ConfigTableField extends AbstractTableField<Table> {

        @Override
        protected boolean getConfiguredLabelVisible() {
          return false;
        }

        @ClassId("a423203e-3578-4ee9-b2fa-bec7271e38f2")
        public class Table extends AbstractTable {

          @Override
          protected boolean getConfiguredAutoResizeColumns() {
            return true;
          }

          @Order(1000)
          @ClassId("2ff2d9db-1ff6-4a1d-b8e0-b7380d4ce2ef")
          public class IdColumn extends AbstractStringColumn {

            @Override
            protected String getConfiguredHeaderText() {
              return "ID";
            }
          }
        }
      }

      @Order(1000)
      @ClassId("4455363c-532b-49d3-9124-394520bcb87c")
      public class MenuMenu extends AbstractMenu {

        @Override
        protected String getConfiguredText() {
          return "Menu";
        }

        @Override
        protected byte getConfiguredHorizontalAlignment() {
          return HORIZONTAL_ALIGNMENT_RIGHT;
        }

        @Order(1000)
        @ClassId("236acaef-b747-430d-be1d-834acb2d521b")
        public class SubMenu1 extends AbstractMenu {

          @Override
          protected String getConfiguredText() {
            return "Sub Menu 1";
          }
        }

        @Order(2000)
        @ClassId("0b919d7b-8fff-4d52-ad68-6a63f8715bbe")
        public class SubMenu2 extends AbstractMenu {

          @Override
          protected String getConfiguredText() {
            return "Sub Menu 2";
          }
        }
      }
    }


Works as expected, see attached image.

Can you post your code?

Regards,
Beat
Re: new title Menu in GroupBox [message #1824508 is a reply to message #1824493] Thu, 16 April 2020 15:23 Go to previous message
Oueslati Anis is currently offline Oueslati AnisFriend
Messages: 137
Registered: June 2014
Location: Paris
Senior Member
Hello,
It worked after I cleaned tha cash :)
Thanks
Previous Topic:Forum Layout in Scout
Next Topic:Trouble with custom Property
Goto Forum:
  


Current Time: Fri Dec 13 09:21:33 GMT 2024

Powered by FUDForum. Page generated in 0.03329 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top