Bunifu Label

Full plain and HTML-text support for form labels

Bunifu Label is a control that allows us to manipulate texts inside our Windows Forms applications. With Bunifu Label we have added additional functionality i.e. HTML support.

Adding on a Form in Design Time

Simply locate Bunifu Label in your toolbox and drag it to your form

Adding at run time

To add a Bunifu Label on our form at run-time we will select the Load event.

To link the Load event to our form, we simply have to double click on our form (on the window) and we will be directed to the code view of the form where you will add the code below.

Code

C#
VB.NET
C#
public partial class Form1: Form
{
public Form1() {
InitializeComponent();
}
private void Form1_Load(object sender, EventArgs e)
{
var newLabel = new Bunifu.UI.WinForms.BunifuLabel();
newLabel.Text = 'My new label’;this.Controls.Add(newLabel);
}
}
VB.NET
Public Class Form1
Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
Dim label As New Bunifu.Framework.UI.BunifuLabel
label.Text =’My new label' Me.Controls.Add(label)
End Sub
End Class

This creates a new object of type BunifuLabel, assigns a text to it and then puts it in our form in order to be displayed. You should see a preview as below.

As you can see, our label is placed at (0, 0) coordinates (this is the default location for newly created controls). We can change that, by adding that line before the line that adds the control to the form:

C#
VB.NET
C#
newLabel.Location = new Point(100, 100);
VB.NET
newLabel.Location = New Point(100, 100)

Now our label will be moved to the location (100, 100)

That's it!

We hope by using Bunifu Label it will help you create better user experience for your users.

Should you have feedback or suggestions please send us via chat on the bottom right corner of the screen.