Table of Contents

Method ReplaceControl

Namespace
Alternet.UI
Assembly
Alternet.UI.dll

ReplaceControl(Control?, Control?)

Replaces one of the controls managed by the SplitterPanel with another one.

public virtual bool ReplaceControl(Control? winOld, Control? winNew)

Parameters

winOld Control

Subcontrol which needs to be replaced.

winNew Control

New subcontrol to replace the old one. Pass here only child controls of theSplitterPanel.

Returns

bool

If the parameters are incorrect or the subcontrol couldn't be replaced, false is returned. Otherwise the function will return true.

Remarks

It is in general better to use it instead of calling DoUnsplit(Control?) and then resplitting the window back because it will provoke much less flicker (if any).