OWASP O2 Platform Blog

Creating a Simple Ribbon Bar

This script will create a simple Ribbon tool bar which is easily customizable 



panel.clear();
var ribbon = panel.add_Ribbon();
ribbon.add_Tab("Tab")
 .add_Group("Group")
 .add_Button("This is a button that opens Notepad", ()=>Processes.startProcess("Notepad"))
 .add_StartProcess("This is for cmd.exe", "cmd.exe")     
 .add_Script("OWASP WebScarab (Custom O2 version)", "OWASP WebScarab (Custom O2 version).h2")
 .add_Button("Now with logo (opening O2 Folder)", "Open_16x16.png", ()=> Processes.startProcess(Environment.CurrentDirectory) );

return "ok";

//O2File:WPF_Ribbon.cs
//O2Ref:RibbonControlsLibrary.dll
//O2Ref:WindowsFormsIntegration.dll

October 18, 2010 - Posted by | O2 Internals

No comments yet.

Leave a comment