Profile Picture

Programmatically changing text of a UI control

Posted By Maisy Kay 3 Months Ago
Author
Message
Maisy Kay
Question Posted 3 Months Ago
View Quick Profile
Forum Newbie

Forum Newbie (0 reputation)Forum Newbie (0 reputation)Forum Newbie (0 reputation)Forum Newbie (0 reputation)Forum Newbie (0 reputation)Forum Newbie (0 reputation)Forum Newbie (0 reputation)Forum Newbie (0 reputation)Forum Newbie (0 reputation)

Group: Forum Members
Last Active: 2 Months Ago
Posts: 1, Visits: 4
Hey Guys, 

I've only started using Nevron today and I'm finding it impossible to change the text for UI elements during run time. I noticed that NButton inherits some modifiers from the built in UI controls that come in .net but for example if I try the following:

myButton.Text = "foo";

No changes are being displayed. Can someone tell me how I am to implement the programmatic change of text during runtime.

Thanks,
Maisy

Nevron Support
Posted 2 Months Ago
View Quick Profile
Supreme Being

Supreme Being (3,904 reputation)Supreme Being (3,904 reputation)Supreme Being (3,904 reputation)Supreme Being (3,904 reputation)Supreme Being (3,904 reputation)Supreme Being (3,904 reputation)Supreme Being (3,904 reputation)Supreme Being (3,904 reputation)Supreme Being (3,904 reputation)

Group: Forum Members
Last Active: 2 Weeks Ago
Posts: 2,878, Visits: 3,040
Hi Maisy,

In order to apply text to a NOV button you need to use:

nButtonControl1.Content = new NLabel("Hello World");

This is required as in NOV buttons can host any widget - for example image, image and text etc. 
We hope this helps - let us know if you meet any problems or have any questions.




Best Regards,
Nevron Support Team





Similar Topics


Reading This Topic