Setting Font of TextBox from code behind

This maybe a stupid question but how do I set the font of a TextBox from a string in the code behind?

// example
txtEditor.FontFamily = "Consolas";

Answers


txtEditor.FontFamily = new FontFamily("Consolas"); // the Media namespace

Need Your Help

Switchcase statement issue. Reading info from txt file c++

c++ struct switch-statement

I am trying to write a program that reads information from a text file and copies it into an array using structs and unions and cstrings. My textfile looks something like this.

Finite Element Library for Heat Transfer 2D

c++ math physics transfer

Hi I am currently COMSOL for calculating the Heat Transfer over time in 2D and I was looking for a library to do it in C++. Is the combination of libMesh and Gmsh the best choice?

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.