Profile Picture

Programmatically changing text of a UI control

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

Supreme Being (4,279 reputation)Supreme Being (4,279 reputation)Supreme Being (4,279 reputation)Supreme Being (4,279 reputation)Supreme Being (4,279 reputation)Supreme Being (4,279 reputation)Supreme Being (4,279 reputation)Supreme Being (4,279 reputation)Supreme Being (4,279 reputation)

Group: Forum Members
Last Active: 4 hours ago
Posts: 3,032, Visits: 3,697
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