Text Layout Element font type and size?

Everything regarding the Power-Grid SDK can be asked and discussed here.

Text Layout Element font type and size?

Postby Andre » 28. Sep 2015, 11:36

Hi again Addihash,
I'm having problem trying to set Text Layout Element font type and size with DCLayout.font property.
Example below works at desktop but doesn't at Android app.
Code: Select all
var xText = this.FindLayout("BtnTitle");
xText.font = "EuroDO";


This example doesn't work at all. I wonder how should I put font size param? Would you please help me?
Code: Select all
var xText = this.FindLayout("BtnTitle");
xText.font = "EuroDO,35";
Andre
 
Posts: 21
Joined: 26. Jul 2015, 14:51

Re: Text Layout Element font type and size?

Postby Addihash » 29. Sep 2015, 10:20

Changing the font doesn't seem to work, at least not on android. However you can set the fontsize using the following:
Code: Select all
var xText = this.FindLayout("BtnTitle");
xText.fontSize = 35;
// or
xText.setFontSize(35);
Addihash
Administrator
 
Posts: 232
Joined: 2. Feb 2015, 14:35

Re: Text Layout Element font type and size?

Postby Andre » 5. Oct 2015, 10:23

Thanks a lot Addihash :)
Andre
 
Posts: 21
Joined: 26. Jul 2015, 14:51


Return to Power-Grid SDK

Who is online

Users browsing this forum: No registered users and 1 guest

cron