473,805 Members | 2,003 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How can I develop a drop-down font control ???

Hi,

I am trying to list all font families in a combo box control.
But all font families does not support all font styles .

How can i get the list of all font style and font size supported by a
specific font family
like in font dialog window control ???

Please help me and reply as soon as possible.

ThankYou

Nov 17 '06 #1
2 4703
System.Drawing. Text.InstalledF ontCollection x = new
System.Drawing. Text.InstalledF ontCollection() ;
foreach(FontFam ily x1 in x.Families)
{
MessageBox.Show (x1.Name);
}

3000 .NET and SQL Server Interview question ebook
http://www.questpond.com/SampleInter...estionBook.zip

Melisa wrote:
Hi,

I am trying to list all font families in a combo box control.
But all font families does not support all font styles .

How can i get the list of all font style and font size supported by a
specific font family
like in font dialog window control ???

Please help me and reply as soon as possible.

ThankYou
Nov 17 '06 #2
Hi Melisa,

(using System.Drawing)

foreach (FontFamily family in FontFamily.Fami lies)
{
Console.WriteLi ne(family.Name) ;
Console.WriteLi ne("\t\tBold={0 }",
family.IsStyleA vailable(FontSt yle.Bold));
Console.WriteLi ne("\t\tItalic= {0}",
family.IsStyleA vailable(FontSt yle.Italic));
Console.WriteLi ne("\t\tUnderli ne={0}",
family.IsStyleA vailable(FontSt yle.Underline)) ;
}

I'm not sure, but I think the font sizes are hard-coded. For instance, I've
chosen Arial 8 in some applications (IIRC, VS.NET) from the dialog and it's
converted to 7.5 automatically.

--
Dave Sexton

"Melisa" <pr************ *@nagarro.comwr ote in message
news:11******** **************@ e3g2000cwe.goog legroups.com...
Hi,

I am trying to list all font families in a combo box control.
But all font families does not support all font styles .

How can i get the list of all font style and font size supported by a
specific font family
like in font dialog window control ???

Please help me and reply as soon as possible.

ThankYou

Nov 17 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

30
2573
by: Erwin Moller | last post by:
Hi group, Just curious what IDEs are popular nowadays. What do you expect from an IDE? Debugging? Do you use your IDE for debugging, or do you work like me? (Just use some smart-placed var_dump() to dive into possible problems?) Syntax highlightning?
0
1751
by: Patrick Robinson | last post by:
Hi all, I'm looking to develop a drag and drop gui for an application i'm writing and although pretty familiar with the java language/awt this is the first time i've needed to use this style of gui and i'm not sure exactly which classes i should use as the basis for the program. I would like a gui where a user can select one of a number of 'blocks' (fixed size images representing data objects) that can be selected from a menu, dropped...
0
1410
by: João Maia | last post by:
Hello I’m trying to develop a functionality, something like drag and drop objects. I have a windows form and I want to select an area in the forms window that I can drag drop all the select objects to a new position in form I don't know if I have to really draw the rectangle in screen and if exists some way of the objects know that they are selected and have to move all sync when I try to move them If you can contribute with some ideas,...
2
401
by: John Jenkins | last post by:
Hi, I need to develop an app that can drag an xml file from my desktop and drop it into a textbox, where it iwll be displayed. 1. I though this should be straightforward but I cannot get it to work. I tried http://www.c-sharpcorner.com/Code/2002/Nov/DragDrop.asp but it did not work. Can someone point me in the right direction?? Thanks
2
3070
by: Mc Spooney | last post by:
I have installed the open source C# IDE, Sharp Develop. Is there a component pallete to allow you to drag and drop controls, such as text boxes and labels etc onto a form ? If so how do you switch it on ? Not that I can't do everything dynamically but it just saves lots of time when you have to design lots of basic forms.
2
928
by: Bud | last post by:
Hi I'm new to .net. I would like to develop a web application where I can drag a 'Customer Name" from a tree list and drop it on a "Update Customer Address Button" . Are there any simple VB examples that show Drag-and-Drop for a beginner.
1
1475
by: dotnet | last post by:
Hi, I need to develop web application using vs.net I've started with asp.net I've books for asp.net and C#. But any book or sites deal only with note pad. How do I learn how to use vs.net to develop web application using C#.net Please can any one help me........
1
1753
by: Cylix | last post by:
My application have a file list, I set the the list will drag the file fullpath string already. When I drop it to outlook email, it pasted as a text ... How can I paste it as a attachment? Thanks a lot.
1
4830
by: Thi | last post by:
Hi, I am trying to develop an application that allows the users to drag a few file(s) from a zip archive to a destination. My question is, how do i determine where the drop destination is because i need to do some validation checking before extracting the files from the zip archive (e.g. validate archive password). Any help or some sample codes would be very much appreciated.
2
5282
by: Andreas Mueller | last post by:
Hi All, I'm trying to show a context menu during a drag drop operation similar to the windows explorers right click drag and drop behavior (A full working sample is at the end of the post): void treeView1_DragDrop(object sender, DragEventArgs e) { ContextMenu mnu = new ContextMenu(); mnu.MenuItems.Add("Click me", OnCmClick);
0
9716
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9596
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10360
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10366
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
7646
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6876
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5542
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4323
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3845
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.