A single document interface (SDI) application displays only one document at a time. SDI applications require the user to load another instance of the application to work with two or more documents. ActiveBar 3.0 allows you to create SDI applications with ease.
This Walkthrough is split up into the following activities.
When you have completed this walkthrough, you will have an SDI application that looks similar to the following.
![]() |
![]() |
| Category | ID | Name | Caption | Type | Description |
|---|---|---|---|---|---|
| Main Menu | 1 | fileMenu | File | Button | Displays File Popup menu. |
| Main Menu | 2 | editMenu | Edit | Button | Displays Edit Popup menu. |
| Main Menu | 3 | viewMenu | View | Button | Displays View Popup menu. |
| Main Menu | 4 | insertMenu | Insert | Button | Displays Insert Popup menu. |
| Main Menu | 5 | formatMenu | Format | Button | Displays Format Popup menu. |
| Main Menu | 6 | helpMenu | Help | Button | Displays the Help Popup menu. |
| Category | ID | Name | Caption | Type | Description | Shortcut |
|---|---|---|---|---|---|---|
| File | 101 | newMIFile | &New | Button | Creates a new document. | CTRL+N |
| 102 | openMIFile | &Open | Button | Opens a document. | CTRL+O, CTRL+F12, ALT+CTRL+F12 | |
| 103 | saveMIFile | &Save | Button | Saves the active document. | CTRL+S, SHIFT+F12, ALT+SHIFT+F12 | |
| 104 | saveasMIFile | Save &As | Button | Saves active document with a new name. | F12 | |
| 105 | printMIFile | Button | Prints the active document. | CTRL+P, CTRL+SHIFT+F12 | ||
| 106 | pagesetupMIFile | Page Set&up... | Button | Modifies the page layout. | ||
| 107 | exitMIFile | E&xit | Button | Exits application and prompts to save changes to the active document. | ||
| Edit | 201 | undoMIEdit | &Undo | Button | Reverses last action. | CTRL+Z, ALT+BACKSPACE |
| 202 | cutMIEdit | C&ut | Button | Cuts the current selection from the document and places it on the clipboard. | CTRL+X, SHIFT+Delete | |
| 203 | copyMIEdit | &Copy | Button | Copies the current selection from the document and places it on the clipboard. |
CTRL+C, CTRL+Num 0
|
|
| 204 | pasteMIEdit | &Paste | Button | Pastes an item from clipboard into a document to the left of the cursor. |
CTRL+V, SHIFT+INSERT
|
|
| 205 | findMIEdit | &Find | Button | Displays the Find dialog. |
CTRL+F
|
|
| 206 | replaceMIEdit | &Replace | Button | Displays the Find and Replace dialog. |
CTRL+H
|
|
| 207 | clearMIEdit | Cle&ar | Button | Displays the Clear sub menu. |
DELETE
|
|
| 208 | selectallMIEdit | Select &All | Button | Selects all the items in the document. |
CTRL+A, CTRL+Num 5
|
|
| View | 301 | mainmenuMIView | Main Menu | Button | Shows or hides the Main Menu. |
|
| 302 | standardtoolbarMIView | Standard Toolbar | Button | Shows or hides the Standard Toolbar. |
|
|
| 303 | optionsMIView | Options... | Button | Set application standards. |
|
|
| Insert | 401 | breakMIInsert | Break... | Button | Inserts a page break into a document. |
|
| 402 | pagenumbersMIInsert | Page N&umbers | Button | Inserts page numbers into a document. |
|
|
| 403 | datetimeMIInsert | Date and &Time | Button | Displays the Date and Time dialog. |
|
|
| 404 | symbolMIInsert | Symbol... | Button | Displays Symbol dialog. |
|
|
| 405 | pictureMIInsert | Picture... | Button | Displays the Picture dialog for selecting a picture file. |
|
|
| 406 | hyperlinkMIInsert | Hyperlink... | Button | Displays the Hyperlink dialog for adding a Hyperlink to a document. |
CTRL+K
|
|
| Format | 501 | fontMIFormat | &Font | Button | Sets the font settings for the current selection. |
|
| 502 | bulletMIFormat | B&ullet | Button | Inserts bullet on the same line as the . |
CTRL+SHIFT+F
|
|
| 503 | tabsMIFormat | &Tabs | Button | Sets the Tabs for a document. |
|
|
| 504 | formatpaintMIFormat | Format &Painter | Button | Copies the format of the current selection to be imposed onto another selection. |
|
|
| 505 | boldMIFormat | &Bold | Button | Toggles the Bold setting on or off. |
CTRL+B, CTRL+SHIFT+B
|
|
| 506 | italicMIFormat | &Italic | Button | Toggles the Italic setting on or off. |
CTRL+I, CTRL+SHIFT+I
|
|
| 507 | underlineMIFormat | &Underline | Button | Toggles the Underline setting on or off. |
CTRL+U, CTRL+SHIFT+U
|
|
| 508 | fontcolorMIFormat | Font &Color | Button | Sets the Font Color for the currently selected text. |
|
|
| 509 | highlightMIFormat | &Highlight | Button | Sets and highlights the currently selected text. |
|
|
| Help | 601 | whatsthisMIHelp | What's This | Button | Displays What's This Help. |
SHIFT+F1
|
| 602 | aboutMIHelp | &About | Button | Displays current application version and copyright information. |
|
|
| Clear | 2091 | formatMIClear | Format... | Button | Clears the formats for the current document. Tool displayed in Clear submenu. |
|
| 2092 | contentsMIClear | Contents | Button | Clears the contents of the current document. Tool displayed in Clear submenu. |
F1
|
|
| Other | 701 | separatorMIOther | Separator | Separates menu items and icons into groups to create a more organized UI. |
|
| Type | Name | Caption |
|---|---|---|
| Popup menu | filePopup | &File |
| Popup menu | editPopup | &Edit |
| Popup menu | viewPopup | &View |
| Popup menu | insertPopup | &Insert |
| Popup menu | formatPopup | F&ormat |
| Popup menu | helpPopup | &Help |
| Category | ID | Name | Caption | Type | Description> |
|---|---|---|---|---|---|
| File | 101 | newMIFile | &New | Button | Creates a new document. |
| 102 | openMIFile | &Open | Button | Opens a document. | |
| 103 | saveMIFile | &Save | Button | Saves the active document. | |
| 105 | printMIFile | Button | Prints the active document. | ||
| 106 | pagesetupMIFile | Page Set&up | Button | Modifies the page layout. | |
| Edit | 201 | undoMIEdit | &Undo | Button | Reverses last action. |
| 202 | cutMIEdit | C&ut | Button | Cuts the current selection from the document and places it on the clipboard. | |
| 203 | copyMIEdit | &Copy | Button | Copies the current selection from the document and places it on the clipboard. | |
| 204 | pasteMIEdit | &Paste | Button | Pastes an item from clipboard into a document to the left of the cursor. | |
| 205 | findMIEdit | &Find | Button | Displays the Find and Replace dialogue. | |
| Format | 504 | formatpainterMIFormat | Format &Painter | Button | Copies the format of the current selection to be imposed onto another selection. |
| 505 | boldMIFormat | &Bold | Button | Toggles the Bold setting on or off. | |
| 506 | italicMIFormat | &Italic | Button | Toggles the Italic setting on or off. | |
| 507 | underlineMIFormat | &Underline | Button | Toggles the Underline setting on or off. | |
| 508 | fontcolorMIFormat | Font &Color | Button | Sets the Font Color for the currently selected text. |
When you finish, your SDI Toolbar ought to look similar to this toolbar.
Note: You can have ActiveBar automatically resize child controls. Resizing can be proportional or set to the client area. ActiveBar automatically resizes the Rich Textbox control as users dock bands to different areas on the form.
ActiveBar31.ClientAreaControl = rtf ActiveBar31.RecalcLayout
When you are finished your application will look similar to the following.
| See Also |
Adding ActiveBar to a Project | ActiveBar Icon Editor | Setting Shortcut Keys | Creating a Menu | Walkthrough: Multiple Document Interface
Copyright © 2006 Data Dynamics, Ltd. All Rights Reserved.