How can I remove a component in the form designer?

I am creating a custom control that contains other controls, including two scroll bars, one horizontal, one vertical. There's a property to set one or both scrollbars to be invisible, which works fine at runtime, but at design time it doesn't disappear from the form designer when I set the property.

Now I can understand how this can be a useful function if it is a separate control, but it is part of the aggregate component and therefore must obey the rules for managing parents, not form designers. Is there a way to make sure the control disappears when I installed .Visible := false;, even if it is in the form designer?

+3
source share
1 answer

You can set the control flag CsNoDesignVisible ControlStyle. If this flag is set, the Visible property will work the same as at run time.

+12
source

Source: https://habr.com/ru/post/1719034/


All Articles