Code Monkey home page Code Monkey logo

Comments (6)

mojo2012 avatar mojo2012 commented on July 20, 2024

I changed the code of the ToolbarHandler for the Mac platform (uncommented a line) and now the customization works.

At least the dialog shows up. But I don't know how to add toolbuttons to the dialog and not the toolbar itself.

from eto.

cwensley avatar cwensley commented on July 20, 2024

It will take a bit of work to implement toolbar customization for all platforms (if you want to take a stab at it, it would be more than welcome).

If you just want to allow customization for the OS X toolbar, you can probably do so using the styles (in your monomac app):

Style.AddHandler<ToolBarHandler> ("mytoolbarstyle", handler => {
    handler.Control.AllowsUserCustomization = true;
    handler.Control.Delegate = new MyToolbarDelegateThatHandlesCustomization ();
});

and in your form:

this.ToolBar = args.ToolBar.GenerateToolBar();
this.ToolBar.Style = "mytoolbarstyle";

The main difference between showing items in the customization palette vs. what items are shown on the toolbar is the DefaultItemIdentifiers() method of the delegate.

from eto.

mojo2012 avatar mojo2012 commented on July 20, 2024

thanks for the tipp. Is there any way to customize toolbar buttons as well? Do they have some kind of default style applied, or can I use this styling method to style children of the actual control as well?

For example to set the bezelstyle of a Cocoa toolbar button to BezelStyle.TexturedRounded or to change the button size?

from eto.

cwensley avatar cwensley commented on July 20, 2024

Yes you can override the Generate() method on your ButtonAction for the toolbar and apply your style to the returned ToolBarItem. I may add a ToolBarItemStyle and MenuItemStyle to the BaseAction and ActionItem classes for easier use of styles there.

For general questions in the future please try to use the forums or irc, so others can find the answers as well. (;

from eto.

mojo2012 avatar mojo2012 commented on July 20, 2024

Do you mean this forums: http://picoe.ca/forums/ ?

If yes, then there is no generic Eto Forms board. Or do I miss something here?

from eto.

cwensley avatar cwensley commented on July 20, 2024

In the readme.md, there's a link to the forums and IRC under the Discussion section. Most people have been opting for IRC than the forums, but I monitor both. (;

from eto.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.