Description
Procedure calculates rectangle where popup should be placed and assign it to Bounds variable. PSCCalcPopupRect tries to place rectangle under the ControlRect. If it is not possible - it places over the ControlRect. But if it is not possible too, tries to place it on the left or on the right side of ControlRect.
Parameters ControlRect Determines excluding rectangle where popup rectangle should not be placed. Alignment Determines alignment relatively to the ControlRect. Bounds Determines the bounds of popup window rectangle.