473,662 Members | 2,704 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

FontDialog

Hi,

In my application, I would like to use a FontDialog which allows
users to change some options of font of the data in DataGrid. However,
I don't want to let the users to modify the face of the font (the
options that would be allowed are bold, italic, color...). I wonder if
somebody know if I am able to make the "face listbox" in the
FontDialog invisible, or if I am able to eliminate all the non-current
font face from the "face listbox".

Any help is appreciated :)

Joanne
Nov 13 '05 #1
1 3578
I beleive this is not supported by the default implementation of
FontDialog. you may try to drive a new class - say CustFontDialog - from
the FontDialog class and before showing it hide or - I prefer - disable the
controls.
An alternative, since the options you want are simple, you may create a
simple dialog for them.

Thanks,
Mohamed

--

This posting is provided "AS IS" with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm

Note: For the benefit of the community-at-large, all responses to this
message are best directed to the newsgroup/thread from which they
originated.

Nov 13 '05 #2

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

Similar topics

0
2308
by: Tim Haughton | last post by:
I've just released an article on using Test Driven Development with C# and Windows Forms. GUI's are often difficult to test, so I thought it might be of interest. The article along with the example source code can be downloaded here: http://www.blogitek.com/timhaughton/archives/files/User%20Interrogator%20And%20TDD.zip The article text is below. Not sure what it will do to the formatting when
3
26558
by: Wim | last post by:
I would like to store the ListView font in the XML config file. So I have a string variable listFont that stores the font (font.ToString()). It must be a string variable because a Font object cannot be written to the XML config file. Next time the program is started the font is read from the config file. But how to convert the string to a Font object? -- Wim
0
1213
by: groast | last post by:
Hi, I'm not good with programming, so wanna ask quite a stupid question. I make a font dialog as a part of my parent form. Then i used the MDI to create a child form which consist of a richTextBox How do change the font and colour of my typing in richTextBox inside my child form from the fontDialog in my parent form. And about the changing of the fonts, how to separate this 2 scenario :
3
2607
by: active | last post by:
A few questions about the FontDialog and dealing with Fonts Is it necessary to pass the parameters ByRef so that updated values can be returned.? I wouldn't think it is necessary for the font but is required for the color. Is that correct?? Private Sub DialogSetFontVariable(ByRef acolor As Drawing.Color, ByRef audtFontVariable As Font)
1
1523
by: Chris | last post by:
Hi all, I've been trying to update the font style in a RichTextBox using FontDialog. But when I use this method (Rather than change each attribute individually) all the text in the RTB changes to the new font. Is there any way to just make the selected text change or the text from that point onwards change, leaving the rest intact? Chris
2
1706
by: new at this via DotNetMonster.com | last post by:
i am new at this and i need some help. i am working with 2 richtextboxs,2 radiobuttons,1 fontdialog and a button i am trying to make it so when you select radiobutton1 and hit button1 the font dialog will control richtextbox1s font and color and if you select radiobutton2 and hit button1 you can control rich textbox2s font and color. -- Message posted via DotNetMonster.com...
2
7713
by: piercy | last post by:
The project im working on requires the user to be able to print reports based on information the program gathers. (ie.To, From, Cost, Username etc.etc.). Now to make this report thing more usable im going to add lots of customizable options. For instance, row color, font size, font type, font color, header color etc. So i added the fontDialog control to my page and for time being just called ShowDialog on a button click. Theres an...
3
1808
by: Tony Johansson | last post by:
Hello! I have a class called Simple Editor below where most of it is from a book that I'm reading. If I want to add a Header and a Footer to each page printed. We can just as an example want to have the filename printed on beginning and the end of each page printed. can somebody give me a hint how I best accomplish that?
0
1166
by: Tony Johansson | last post by:
Hello! I have a simple application from a book where the actual applications permission doesn't match the permission referenced from the book. My question is written further down. The book is saying the following : "The calculate permission button from the security properties of Visual Studio analysis is an application manifest that includes all required permissions. With Visual Studio 2005, you can see the application manifest with...
0
8345
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
8857
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
8547
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,...
0
8633
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7368
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6186
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
5655
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
4348
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2763
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

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.