Table of Contents

Method SetDefaultButtonExclusive

Namespace
Alternet.UI
Assembly
Alternet.UI.Common.dll

SetDefaultButtonExclusive(Button?)

Sets the specified button as the default button, ensuring that no other buttons are marked as default.

public virtual void SetDefaultButtonExclusive(Button? button)

Parameters

button Button

The button to set as the default. If null, all buttons will be unset as default.

SetDefaultButtonExclusive(int)

Sets the specified button as the default button, ensuring it is the only default button.

public virtual bool SetDefaultButtonExclusive(int index)

Parameters

index int

The zero-based index of the button to set as the default.

Returns

bool

true if the button was successfully set as the default; otherwise, false if the button is not visible or does not exist.

SetDefaultButtonExclusive(KnownButton)

Sets the specified button as the default button, ensuring it is the only default button.

public virtual bool SetDefaultButtonExclusive(KnownButton value)

Parameters

value KnownButton

The button to set as the default, identified by a KnownButton value.

Returns

bool

true if the button was successfully set as the default; otherwise, false if the button could not be found.

SetDefaultButtonExclusive(MessageBoxDefaultButton)

Sets the default button for the panel exclusively based on the specified button value.

public virtual bool SetDefaultButtonExclusive(MessageBoxDefaultButton value)

Parameters

value MessageBoxDefaultButton

The MessageBoxDefaultButton value representing the button to set as default.

Returns

bool

true if the default button was set successfully; otherwise, false.

Remarks

This method maps the specified MessageBoxDefaultButton to an internal representation and sets it as the default button. If the specified button value is not recognized, the method returns false.