HypernovaDesktop Components · docs
Binarymission
WinFormsExtended Text › BinaryExtendedText

BinaryExtendedText

class.NET 6 / 8 / 10.NET Framework 4.8Binarymission.WinForms.Controls.TextControls

BinaryExtendedText© .NET control is an advanced and "feature-rich text box" control for the WinForms .NET© platform.

public class BinaryExtendedText : System.Windows.Forms.TextBox

Inherits from / implements: System.Windows.Forms.TextBox

Remarks

The control supports a set of "feature rich" properties in order to provide a Windows XP© style look-and-feel "text box" control, with additional features, such as the ability to change the control's border color, special hovering effects as one can see in the Visual Studio .NET controls, and a cool "border blinking" alerting mechanism.
The control basically derives from the .NET TextBox control, does its own custom painting, and in addition exposes properties to set various of its states/behaviors.
For more information, please refer to the various properties, especially, the ShowBorderAlways, ExtendedState, and the BorderColor properties.

Members at a glance

BinaryExtendedTextCreates a new instance of the BinaryExtendedText .NET control.
BorderColorGets or sets the border color of the control's borders.
BorderColorWhenControlIsDisabledGets or sets the color to use to draw the control's border, when the control is disabled.
BorderColorWhenControlIsNotInFocusGets or sets the color to use to draw the control's border, when the control is not in focus, and the control's ShowBorderAlways is not set to true.
BorderStyle
DotBorderDepthGets or sets the painting depth (length/width) of a dotted border.
DotBorderGapGets or sets the painting gaps between the dots while drawing the dotted border for the control.
DrawBorderGets or sets the border state of the control when drawing the control's border.
ExtendedStateGets or sets whether the control will be displayed in its Extended style mode or not.
OptimiseRedrawWhenDisabledGets or sets a value indicating whether to optimise redrawing of Control's artefacts when disabled.
ShowBorderAlwaysGets or sets whether the control will always have its border displayed, even when the control is not currently in focus.
UseEnhancedPasswordCharGets or sets whether the "password" text will be displayed using the popular "XP-style", block dots fashion.
OnGotFocus
OnLostFocus
OnMouseEnter
OnMouseLeave
StartToBlinkBlinks the control's border. This method takes a Color value and blinks the control's border.
StartToBlinkBlinks the control's border. This method takes a Color value and a Timer interval, and blinks the control's border.
StopBlinkingStops blinking the control's border.
WndProc

Constructors

BinaryExtendedText

public BinaryExtendedText()

Creates a new instance of the BinaryExtendedText .NET control.

Properties

BorderColor

public Color BorderColor

Gets or sets the border color of the control's borders.

Use this property to set the control's border color.
This property will have effect only when the control's ExtendedState property is set to true.
Note: Changing this property will not have any effect if the control is currently being blinked.
By default, this property is set to Highlight color value.

BorderColorWhenControlIsDisabled

public Color BorderColorWhenControlIsDisabled

Gets or sets the color to use to draw the control's border, when the control is disabled.

Use this property to set the color used for drawing the control's border while the control's Enabled property is set to false.
This property will have effect only when the control's ExtendedState property is set to true and its OptimiseRedrawWhenDisabled property is set to false.
By default, this property is set to the InactiveBorder color value, which preserves the control's traditional disabled appearance. On some Windows themes the InactiveBorder color is white (or very close to white), and therefore the disabled border may not be readily visible against the control's background. If you want the disabled border to remain visible, set this property to a suitable color - for example, to the same value as the BorderColor or the BorderColorWhenControlIsNotInFocus property.
Note: This property affects the border color only. It does not change the disabled background or the disabled (grayed) text of the control.

BorderColorWhenControlIsNotInFocus

public Color BorderColorWhenControlIsNotInFocus

Gets or sets the color to use to draw the control's border, when the control is not in focus, and the control's ShowBorderAlways is not set to true.

BorderStyle

public new BorderStyle BorderStyle

No summary in the source yet.

DotBorderDepth

public int DotBorderDepth

Gets or sets the painting depth (length/width) of a dotted border.

When you set the DrawBorder property to "Dotted" (refer BorderState), the control is drawn with a dotted border.
You can set the depth of each of the dotted border part by setting this property. This property determines the length/width of each of the dot, while drawing the border.

This property will have effect only when the control's ExtendedState property is set to true. By default, this property is set to integer (int) value of 4.

DotBorderGap

public int DotBorderGap

Gets or sets the painting gaps between the dots while drawing the dotted border for the control.

When you set the DrawBorder property to "Dotted" (refer BorderState), the control is drawn with a dotted border.
You can set the gap between each of the dotted border part by setting this property. This property determines the length of gap between each dot, while drawing the border.

This property will have effect only when the control's ExtendedState property is set to true. By default, this property is set to integer (int) value of 5.

DrawBorder

public BorderState DrawBorder

Gets or sets the border state of the control when drawing the control's border.

This property is available only when the control is in ExtendedState mode.
Basically, there are two different states available for drawing the control's border, while in ExtendedState.
  1. Normal border - This is a BorderState when the control's border is drawn using a continuous line.
  2. Dotted border - This is a BorderState when the control's border is drawn as a dotted border.

If you want the control's border to be drawn as a dotted border, you should set this property to the appropriate value, viz., BinaryExtendedText.BorderState.Dotted.
If you want the control's border to be drawn as a regular non-dotted line, set this property to BinaryExtendedText.BorderState.Normal.

This property will have effect only when the control's ExtendedState property is set to true.
By default, this property is set to BinaryExtendedText.BorderState.Normal.

ExtendedState

public bool ExtendedState

Gets or sets whether the control will be displayed in its Extended style mode or not.


The control supports two different styles for its display, viz., Standard Windows 3D text box style and an "extended feature rich" style. You can switch between these two styles at any time by setting the control's ExtendedState property.
The "Extended" style provides for the following rich features :-

<font color="blue">1. Custom border color</font> - The control supports setting custom border color. By default, when the control is in the extended style mode, its borders are drawn using the Highlight color. You can set a different color for drawing the control's border, by setting its BorderColor property.

<font color="blue">2. Custom Border styles</font> - The control supports two different border styles - Normal and Dotted.
By setting the DrawBorder property to Dotted style, you can have the control's border drawn as a dotted line.
Refer DrawBorder property for more details about this feature.

<font color="blue">3. Mouse hovering effects</font> - While in extended style mode and when the input focus is not on the control, whenever the mouse focus moves over and out of the control, the control's borders are drawn and cleared respectively, giving a "Visual Studio .NET style" control hovering effects.
To change this default behavior, you can set the control's ShowBorderAlways property to true, if you want the control's border to be displayed irrespective of whether the control has input focus or otherwise.

OptimiseRedrawWhenDisabled

public bool OptimiseRedrawWhenDisabled

Gets or sets a value indicating whether to optimise redrawing of Control's artefacts when disabled.

Value. true if the Control should optimise redrawing when in disabled state; otherwise, false .

ShowBorderAlways

public bool ShowBorderAlways

Gets or sets whether the control will always have its border displayed, even when the control is not currently in focus.

If set to true, the control will always display its border even when the input focus is not on the control.
This property will have effect only when the control's ExtendedState property is set to true.
By default, this property is set to false.

UseEnhancedPasswordChar

public bool UseEnhancedPasswordChar

Gets or sets whether the "password" text will be displayed using the popular "XP-style", block dots fashion.

BinaryExtendedText .NET can display password text (i.e. when the control is in "password text" mode) using the popular XP-style block dots.
Set this property to true, to display the password text using the enhanced "XP-style" block dots.
Once you set this property to true, any further changes to the PasswordChar property is completely ignored!
And hence, whenever you restate this property to false (from an earlier state of true), ensure that you re-set the PasswordChar property again with your custom password character.

Setting this property to false, displays password text using the normal user specified PasswordChar character.
By default, this property is set to false.

Methods

OnGotFocus

protected override void OnGotFocus(EventArgs e)

No summary in the source yet.

e

OnLostFocus

protected override void OnLostFocus(EventArgs e)

No summary in the source yet.

e

OnMouseEnter

protected override void OnMouseEnter(EventArgs e)

No summary in the source yet.

e

OnMouseLeave

protected override void OnMouseLeave(EventArgs e)

No summary in the source yet.

e

StopBlinking

public void StopBlinking()

Stops blinking the control's border.

Calling this method will stop blinking the control's border, if the border is currently being blinked.
Remember, this method will have effect only when the control's ExtendedState property is set to true and the control is currently Enabled.
Whenever you need to set the properties ExtendedState or Enabled to false, ensure to call this method, if the control is currently being blinked, as otherwise, the control will continue to blink when these states (ExtendedState or Enabled) are reset to true at a later stage.

WndProc

protected override void WndProc(ref Message m)

No summary in the source yet.

m