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.
Simply locate Bunifu Label in your toolbox and drag it to your form
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.
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);}}
Public Class Form1Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.LoadDim label As New Bunifu.Framework.UI.BunifuLabellabel.Text =’My new label' Me.Controls.Add(label)End SubEnd 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:
newLabel.Location = new Point(100, 100);
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.