Profile Picture

Programmatically changing text of a UI control

Posted By Maisy Kay 4 Years Ago
Author
Message
Maisy Kay
Question Posted 4 Years 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: 4 Years 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 4 Years Ago
View Quick Profile
Supreme Being

Supreme Being (4,329 reputation)Supreme Being (4,329 reputation)Supreme Being (4,329 reputation)Supreme Being (4,329 reputation)Supreme Being (4,329 reputation)Supreme Being (4,329 reputation)Supreme Being (4,329 reputation)Supreme Being (4,329 reputation)Supreme Being (4,329 reputation)

Group: Forum Members
Last Active: Last Year
Posts: 3,039, Visits: 3,746
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