Nevron .NET Vision Documentation
Control Borders

Nevron User Interface controls (most of them) provide extended border support, which is unique in its implementation. Nevron GUI provides full control over border appearance of controls like NTextBox, NRichTextBoxNListBox, NTreeView, etc. Flat or raised, sunken or bump - you may specify the desired style and achieve a smoothly painted, professional-looking border for your controls. Other GUI components simply override the default system painting which leads to significant flicker on resize, let alone changing size of the border. The approach used by Nevron is totally different - the non-client size calculating is overridden and practically size and appearance of the border are fully controllable.

The bridge between a NControlBorder object and control is the INControlBorderProvider interface. Each provider knows its default border style, default base color, whether the border is currently hot and its size, and a NControlBorder object. By default the Style and BaseColor values of the NControlBorder field are empty and the default values are used. If there are user-defined values they are used.


Some controls use the so called interactive borders - they display different type of border when not hovered (focused).


The following example demonstrates how to customize border appearance of a NListBox control:

Copy Code
NControlBorder border = this.nListBox1.Border;
border.Style = BorderStyle3D.Raised;
border.BaseColor = Color.SlateGray;

border = this.nListBox2.Border;
border.Style = BorderStyle3D.RaisedFrame;
border.BaseColor = Color.Brown;
Visual Basic
Copy Code
Dim border As NControlBorder = Me.nListBox1.Border
border.Style = BorderStyle3D.Raised
border.BaseColor = Color.SlateGray

border = Me.nListBox2.Border
border.Style = BorderStyle3D.RaisedFrame
border.BaseColor = Color.Brown

The above code results in:


Using The Visual Editor

Nevron User Interface provides an intuitive and convenient way to edit border appearance of your controls. It exposes a visual editor available both at design and run-time.



Choose your favorite style from the "Style" combo, edit the desired base color and specify whether the border is interactive or not, and apply your settings using the "OK" button. You may always restore the default border appearance using the "Default" button.


Only some controls like NTextBox and NListBox implement interactive borders.
See Also



©2019. Nevron Software LLC.

Send Feedback