ThlResizer |
ThlResizer Documentation |
|||||||||||||
About: |
|||||||||||||
ThlResizer is a nonvisual VCL component that is used to resize other controls in an animated fashion. The “Target” control is resized smoothly from minimal to maximal size for expanding and vice versa for contracting. Examples include resizing a dialog to show/hide detail information or zooming of pictures or text fields. |
|||||||||||||
Look at example applications and screenshots on the ThlResizer homepage. |
|||||||||||||
For comments and questions mail to mail@heelana.com. Your feedback is very welcome! |
|||||||||||||
Using: |
|||||||||||||
Drag the ThlResizer component on a form and set its Target property to the control that is to be resized. The target may be the form itself or any other child control, f.e. TPanel, TRichEdit. By double clicking the Sizes property or pressing the ellipse button (“...”) next to it bring up the Sizes dialog. Here you specify whether the target is resized horizontally, vertically or both and the lower and upper bounds. If needed you can alter the duration for the resize process. Finally you call the Contract/Expand methods whenever the target needs to be resized, f.e. if the user clicks a button. However, there may be other scenarios like changing the target at runtime etc. |
|||||||||||||
Example Code: |
|||||||||||||
void __fastcall TForm1::Button1Click(TObject *Sender) void __fastcall TForm1::Button2Click(TObject *Sender) |
|||||||||||||
procedure TForm1.Button1Click(Sender: TObject); procedure TForm1.Button2Click(Sender: TObject); |
|||||||||||||
Properties: |
|||||||||||||
Animated: If Animated is true the target control is resized smoothly. If set to false it is resized in a single step. |
|||||||||||||
Duration: Specifies in milliseconds how long the resizing takes. The default value is 500 milliseconds. This value should be adjusted according to the difference between minimal and maximal size. |
|||||||||||||
Sizes: Specifies the bounds for resizing the control. Click the ellipse button (“...”) in the ObjectInspector to bring up the Sizes dialog. Use the Vertical and Horizontal checkboxes to select whether the control is to be resized in either one of the directions or both. Then set the minimal and maximal sizes for each direction. |
|||||||||||||
Target: Specifies the control that is to be resized. Select from the ComboBox in the ObjectInspector. |
|||||||||||||
Methods: |
|||||||||||||
Contract: Contracts the target control according to the bounds given in the Sizes property. If Animated is set to true the resizing is performed smoothly else it is done in one step. |
|||||||||||||
Expand: Expands the target control according to the bounds given in the Sizes property. If Animated is set to true the resizing is performed smoothly else it is done in one step. |
|||||||||||||
Linking issues: |
|||||||||||||
If you link your executable with “Build with runtime packages” checked then you must also use the vcl and rtl runtime packages!
|