Selection Button

Selection Button

This tool provides a group of features related to the selection text. When user select a text block in editor, selection button will appear in left side of editor automatically. Clicking this button will drop a context menu.

Selection Button and its context menu is as below:

Edit Menu

- Copy: Copy selected text to clipboard.

- Copy & Append: Copy and append selected text to clipboard.

- Cut: Cut selected text to clipboard.

- Cut & Append: Cut and append selected text to clipboard.

- Duplicate: Duplicate selected text in current position and keep selection.

- Delete: Delete selected text.

- Copy as HTML Format: Copy selected text to clipboard with syntax highlighting. See Source Format Convert Wizard.

- Save to File...: Save selected text to a file.

Convert Case Menu

- To Lower Case: Convert selected text to lower case.

- To Upper Case: Convert selected text to upper case.

- Invert Case: Invert case of selected text.

Format Menu

- Indent: Indent selected block with default levels, may use Tab key to fast do this.

- Indent Columns: Indent selected block with levels user input.

- Unindent: Unindent selected block with default levels, may use Shift+Tab key to fast do this.

- Unindent Columns: Unindent selected block with levels user input.

Comment Menu

- Comment Code: Add '//' to each line of selected code block to make it to comment. See Comment Code Tool.

- Uncomment Code: Search selected code block and remove '//' at linehead to remove the comment. See Uncomment Code Tool.

- Toggle Comment: Search and analyse selected code block. If it's not commented by '//', then add '//' to each line head. Otherwise remove '//' of each line head. See Toggle Comment Tool.

Surround With Menu

- Surround With: Indent selected text if needed and surround it in special code.

- Options: Show settings dialog as below:

- List

- Add: Add a new item.

- Remove: Delete selected item.

- Up, Down: Up or down selected item.

- Import: Import items from data file, can select replace or append mode.

- Export: Export items to data file.

- Reset: Reset items to default.

- Surround Item

  - Caption: The caption shown in menu.

  - Shortcut: Define the shortcut.

  - Block: If the switch "Line Block Mode" is on, then the head and tail of selection will expand to whole line when executing. In this mode, user can set code indent level.

  - Head: Text to insert to the head of selection. If is line block mode, user can set indent level. Use '|' to set cursor position.

  - Tail: Text to insert to the tail of selection. If is line block mode, user can set indent level. Use '|' to set cursor position.

  - Pascal: This item is for Pascal file.

  - C/C++: This item is for C/C++ file.

- OK, Cancel: Save or cancel settings and close dialog.

- Help: Show this help.

Group Replace Menu

- Group Replace: Group replace selected text with special context.

- Options: Show settings dialog as below.

- List

- Add: Add a new item.

- Remove: Delete selected item.

- Up, Down: Up or down selected item.

- Import: Import items from data file, can select replace or append mode.

- Export: Export items to data file.

- Group Replace Items

  - Caption: The caption shown in menu.

  - Shortcut: Define the shortcut.

  - Items: List of replace context.

  - Add: Add a new item.

  - Remove: Delete selected item.

  - Up, Down: Up or down selected item.

  - From: The search string.

  - To: The replacement string.

  - Ignore Case: Ignore case when performing a replace.

  - Match Whole Word: Searches for words only.

- OK, Cancel: Save or cancel settings and close dialog.

- Help: Show this help.

Web Search Menu

- Web Search: Open special URL or run program to search selected text.

- Options: Show settings dialog as below.

- List

- Add: Add a new item.

- Remove: Delete selected item.

- Up, Down: Up or down selected item.

- Import: Import items from data file, can select replace or append mode.

- Export: Export items to data file.

- Web Search Item

  - Caption: The caption shown in menu.

  - Shortcut: Define the shortcut.

  - Search URL: Filename or http link. %s mean selected text.

- OK, Cancel: Save or cancel settings and close dialog.

- Help: Show this help.

Others Menu

- Eval Swap: Swap each evaluate expressions. i.e. change all A := B to B := A. See Eval Swap Tool.

- Convert to String: Convert selected source block to a multi-line string, avoiding input of line-breaks and semicolons. See Convert to String Tool.

- Insert Color: Open a color dialog and use selected color to replace current selected text. See Insert Color Tool.

- Insert Date Time: Open a dialog and use formatted date time string to replace current selected text. Insert Date Time Tool.

- Sort Selected Lines: Sort the lines in a selected block of code . See Sort Selected Lines.

- Move Up: Move selected lines up. If no lines selected, move current line.

- Move Down: Move selected lines down. If no lines selected, move current line.

- Delete Lines: Delete selected lines. If no lines selected, delete current line.

Tool Settings

Settings dialog shows as below:

- Show Section Button when A Block Selected: Enable or disable selection button.

- Show Color Preview when Color String Selected: If a Color string is selected in Editor, such as "clRed" or "$FFFFFF", whether to show the color preview in selection button.

- Show Selection Button Menu Items in Editor Context Menu: Enable or disable inserting a menu into editor context menu. This menu contains the popup menu items in selection button.

Links

Editor Enhancements Wizard

Tabset Enhancement

About CnWizards

Copyrights 2001-2025 CnPack Team