Controls
Text documents and pictures viewer
- Demonstration
- Functionality:
- Static File menu
- Add new... (Ctrl+O) - opening the documents into the viewer
- default open file dialog
- two file filters are defined
- Images (*.jpe; *.jpeg; *.jpg; *.gif; *.bmp; *.png)
- Documents (*.txt; *.rtf)
- multiple selection has to be allowed
- Exit - application closing
- Dynamic Window menu
- each opened file is visible in Window menu
- only file name, without extension, is shown in menu
- selecting the menu item activate a relevant tab
- menu is invisible if no documents are opened
- Dynamic toolbox
- each opened file is visible in toolbox as a button
- button's caption should be set to file name without extension
- pushing the button makes a relevant tab the active one
- toolbox is invisible if no documents are opened
- Tab control
- each opened file is visible in separate tab
- picure's tab content
- pictures are shown in original size with both vertical and horizontal scroll bar if needed
- a picture fills whole possible area of a tab
- text document's tab content
- text documents are shown as read only text with both vertical and horizontal scroll bar if needed
- text fills whole possible area of a tab, no word wrapping is allowed
- tab's context menu
- context menu contains one option named Remove XXX where XXX is the name of the file (without extension)
- an option remove tab from tab control and relevant toolbar button and menu item from Window menu
- tab control's context menu
- that menu contains the options from all tab's context menus
- Status bar
- information about the number of the documents is visible in status bar
- Keyboard actions
- each key from 1 to 9 on alphanumeric keyborad makes nth tab the active one
- Hints:
- OpenFileDialog control
- ToolStripMenuItem class, ToolStripButton class
- ContextMenuStrip control/class
- TabControl control, TabPage class
- Panel control, PictureBox control, RichTextBox control
- Approximate points:
- static menu and open file dialog using [1.0]
- adding the pictures [2.0]
- adding the text documents [2.0]
- dynamic menu [1.0]
- dynamic toolbox [1.0]
- tab's context menus [1.0]
- tab control's context menus [1.0]
- status bar [0.5]
- keyboard action [0.5]