|
Grabs customization
Each of the grab handles (the small squares around the selected control) can be hidden or disabled using the OnCustomizeGrabs event. This event has two special parameters: VisibleGrabs and EnabledGrabs of the TGrabPositions type.
type
TGrabPosition = (
gpNone,
gpLeftTop,
gpLeftMiddle,
gpLeftBottom,
gpMiddleTop,
gpMiddleBottom,
gpRightTop,
gpRightMiddle,
gpRightBottom);
TGrabPositions = set of TGrabPosition;
These parameters can be changed in the event handler to hide or disable any handle. The code below shows how all grabs except middle top and middle bottom can be disabled, so the user can change the selected control height only.
procedure TForm1.FormDesigner1CustomizeGrabs(Sender: TObject;
var VisibleGrabs, EnabledGrabs: TGrabPositions);
begin
EnabledGrabs:=[gpMiddleTop,gpMiddleBottom];
end;
|