Forum     

Go Back   Digit Technology Discussion Forum > Software > Programming
Register FAQ Calendar Mark Forums Read

Programming The destination for developers - C, C++, Java, Python and the lot


Reply
 
LinkBack Thread Tools Display Modes
Old 22-08-2011, 08:43 PM   #1 (permalink)
Right Off the Assembly Line
 
Join Date: Apr 2011
Location: BBSR, Orissa
Posts: 34
Question How to get all font styles from system in c#.net?


I am implementing a Font Dilouge Box application.
I have created 3 listboxes font family,font style & font size & a text box to dispaly the formated text.
I have done the coding to get all the font families & to apply them in the textbox in the following code:

private void listBox1_SelectedIndexChanged(object sender, EventArgs e)
{
Font f = new Font(listBox1.SelectedItem.ToString(),24);
textBox1.Font = f;
}

private void Form1_Load(object sender, EventArgs e)
{
InstalledFontCollection ifc = new InstalledFontCollection();
IEnumerator ie;
ie = ifc.Families.GetEnumerator();
while (ie.MoveNext())
{
listBox1.Items.Add(ie.Current.ToString().Substring (18).TrimEnd(']'));
}


But I am not able to get the system font styles & font sizes to the listbox1 & listbox2
please help me.
Attached Images
File Type: png fontapp.PNG (25.5 KB, 1 views)
binay00713 is offline   Reply With Quote
Advertisements. Register and be a member of the community to get rid of them.
Advertisement

Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


 
Latest Threads
- by Charan
- by Sarath
- by clmlbx

Advertisement




All times are GMT +5.5. The time now is 12:33 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2012, vBulletin Solutions, Inc.

Search Engine Optimization by vBSEO 3.3.2