Mega Code Archive

 
Categories / Delphi / Examples
 

More ide-tricks

Deleting an event handler Simply delete the code from within the handler that you don't need anymore. For example: procedure TFormMain.RGLengthClick(Sender: TObject); begin end; Next, compile the project, and the event handler has disappeared, as well from the interface section as from the implementation! Jump to the VCL Source Code You can jump to the VCL source code from within your Delphi 4 project as follows:1. Press the Ctrl-key. 2. Keep "Ctrl" pressed, move the cursor to the desired name in the code and click it. Resizing a component precisely Select the component. Press and hold the Shift-key, then use the cursor keys to resize the component in 1 dot increments. Selecting a component's parent When designing forms, you often put containers, such as panels, that will "hold" other components. When a particular component is selected, it's very easy to select that component's parent. Select the component whose parent you wish to find, and press the Esc-key. This will select that component's parent. The procedure can be performed repeatedly: finally the ultimate parent, the Form, is selected into the Object Inspector. This tip is especially useful when a component has been 'Aligned to Client' and its parent cannot be selected easily. Moving a component to an exact spot Select the component. Press and hold the Ctrl-key, then use the cursor keys to move the component in 1 dot increments. Fast switching to the Object Inspector Just press the F11-key. Block-mode in the editor In order to copy/delete rectangles ('columns') of text in the editor, press Alt-key, then use the left mousebutton to mark the rectangle. These text rectangles afterwards can be inserted as a block! Fast switching between FORM and code-editor Just press the F12-key.