- Creating Behavior Without Programming
- Using the Code Editor to Write REALbasic Code
- Getting Help with the REALbasic Language
- Mastering Dim and Assignment Statements
- Making Tests and Comparisons
- Writing Code that Branches
- Writing Code that Repeats
- Writing Your Own Methods
- Extending the HTML Editor
- Creating the Indent Menu Item
- Removing Existing Indentation
- Inserting Indentation Before Tags
- Handling the Indent Level
- Extending the Project
Extending the Project
The code as written uses a fixed indent size of three characters, set in the Indent method when you set TabSize equal to 3. It would be nice to let the user set the indent size. I'll leave it as an optional challenge for you. Think about how you might present this choice to the user, and how you would code the application to accept and apply the user's chosen indent size (Figure 4.42).
Figure 4.42 Your HTML editor now indents HTML code for readability.