Tuesday, October 28, 2008 4:00 PM
qbradley
Customizing the Intellipad menu bar
Intellipad's appearance and behavior is extremely customizable. In this post, I would like to show how the Intellipad menu bar can be modified. Future posts will look into changing syntax fonts and colors, and adding or modifying command behavior. In most cases, Intellipad is customized by modifying text files, and these text files are usually found in the Intellipad settings directory. This directory is located at "%ProgramFiles%\Microsoft Oslo SDK 1.0\Bin\Intellipad\Settings".
There are several ways to set the zoom level of text. You can click the zoom level indicator in the buffer view header , you can open the mini-buffer and issue a command like Zoom(1.5), or you can use the default keyboard shortcuts Ctrl+Minus or Ctrl+Plus (without the shift key). For the sake of argument, suppose you would like to have a menu for increasing and decreasing the zoom. The first step is to determine the name of the command you want to bind to. There are two ways to do this. One is to look at the python files in the settings directory. Another is to use the built in help. Press the F1 key or choose the Help|Commands menu to see the list of available commands. In the resulting buffer view, you can search through the list of commands. Here I have found the ones I am looking for and highlighted them:
Now I would like to create a top level View menu with Zoom Up and Zoom Down items. From the File | Open menu, I navigate to the file "%ProgramFiles%\Microsoft Oslo SDK 1.0\Bin\Intellipad\Settings\VisualStudio\MenuBar.xcml". Notice the mti namespace (in the green box) and the File | New menu definition (in the blue box). This definition creates a File menu with a New item that will invoke the command '{Microsoft.Intellipad}New' when selected.
Scroll down the document to just above the top level Window menu definition and insert the selected text:
Save your changes. Unfortunately you will need to have Administrator permissions to overwrite MenuBar.xcml in the October 2008 CTP on Vista. Either launch Intellipad as Administrator or change the permission on the file from the windows explorer.
Now tell Intellipad to reload its settings. This can be accomplished by invoking the '{Microsoft.Intellipad}ReloadSettings' command. The keyboard shortcut is Ctrl+Alt+F5. After typing those keys, the view menu should appear after a short delay. Selecting the Zoom Up menu item should increase the text size.
That is it! Let me know if you have any questions.
-Quetzal