[SOLVED] ToolStrip, MenuStrip

Answered Closed
0
0

Hi,

from the beta information I can see that you schedule a ToolStrip component which is not available yet. Will this include a MenuStrip too? I’m not sure if this is a WinForms component or it was a VWG invention. What I basically want to achieve is a menu as the one shown in the attached picture, where I have included the names of the various components as they were in VWG.

The other question is what is the timescale for these components.

All the best,

Alex

Attachment
  • You must to post comments
Best Answer
0
0

Hi Alex,

Please try this class in your app. Just an example, but it shows how flexible this thing is. And since it extends MenuItem it will also show up in the menu editor in the designer.

public class MenuLabel : MenuItem
 {
   public MenuLabel() { }
   public MenuLabel(string text) : base(text) { }
   protected override void OnWebRender(dynamic config)
   {
     base.OnWebRender((object)config);

     // make text always bold.
     config.label = "<b>" + this.Text + "<b>";

     // make it anonymous to ignore browser events.
     config.anonymous = true;
   }
 }

Best,

Luca

 

 

  • You must to post comments
0
0

Hi Luca,

I finally saw the dropdown arrow next to the “+” button, it might have been there from the first time I added the MenuLabel class but since I’m using the dark theme of VS, the little arrow was not visible (since I didn’t know what I was looking for!). Thanks.

Alex

  • You must to post comments
0
0

Hi Alex,

Regarding point 1, the class has to be public and you have to recompile. VS makes available to designers a type discovery service, but the type must be either in a referenced assembly or, if it’s in the same project being designed, it must be loaded or loadable from VS.

Sometimes you may have to close and reopen VS. The designer copies and caches lots of stuff.

All the Wisej design editors that handle collections show a single add button if there is one eligible class or a drop down button if there are more classes.

Best,

Luca

  • You must to post comments
0
0

Frank,

point 2 is fixed indeed.

Alex

  • You must to post comments
0
0

Alex,

point 2 is logged as WJ-7408 and should be fixed in 1.2.19 that has just been uploaded.

Can you please verify ?

TIA
Frank

  • You must to post comments
0
0

Luca,

two minor observations:

  1. you said that the MenuItem-derived class will show in the designer. However, I cannot see that. I mean the designer shows only menuitems, it does not make a distinction on what kind of items they are, like the Toolbar designer where one can set the Toolbutton style (Pushbutton, Dropdown etc). Unless I’m missing something.
  2. Playing with the Menubar designer to check if I could see the MenuLabel, I noticed that if I delete an item (select it and press the red x) the item does not disappear from the menubar. And it is not only a refresh matter in the main designer window: the next time you open the menubar designer, the item you have deleted is there.

Best,

Alex

  • You must to post comments
0
0

Absolutely. Add  this to the config:

  config.appearance = "menulabel";

Then add a file named my-menu.mixin.theme under /Themes:

{
 "appearances": {
   "menulabel": {
     "inherit": "menu/item",
     "states": {
       "default": {
           "styles": {
             "transform": "rotateZ(15deg)"
           },
           "properties": {
             "textColor": "red",
             "icon": "icon-settings"
           }
         }
      }
    }
  }
}

The mixin theme will add the new appearance to any theme as it’s loaded in the app. Otherwise you can add the new appearance directly in any theme file.

Best,

Luca

  • You must to post comments
0
0

Luca, this is great! Not only it works, but it gives an idea of the flexibility of the system. Is it also possible to customize the appearance of this MenuLabel derived class from a theme? This is great stuff!

Alex

  • You must to post comments
0
0

Dear Luca,

From what I see in the qooxdoo page you pointed out, the only thing missing compared to the picture I sent you is the “header” of each submenu (which is a ToolStripLabel, a non-clickable item and I was showing it in bold font). If you can make also this, it would be great, I find it very useful to have all choices in one dropdown instead of creating popup submenus.

But I can understand the whole thing won’t be ready before release.

Best,

Alex

 

  • You must to post comments
0
0

Hi Alex,

The ToolStrip system is a relatively large subsystem in WinForms. The “traditional” winforms toolbar that we have now in Wisej covers most of the functionality in VWG and covers all of the toolbar functionality in Winforms. Including drop down menus, icons, menu separators.

The ToolStrip subsystem will be implemented for sure partially by the release date and most likely completed right after.

You can see the widgets that are available to us here: http://demo.qooxdoo.org/devel/demobrowser/#widget~Menu.html

With Wisej we extend the available widgets, integrate them with our themes, and build the server side representation, designers and editors. The server side, designers and editors are the time consuming part.

Best,

Luca

 

  • You must to post comments
Showing 10 results