473,414 Members | 1,667 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,414 software developers and data experts.

Get Font Dialog to Remember Font Properties

9
Hello All,

I have a vb.net windows form with several text boxes.

Upon filling in the text boxes, each text box updates a designated label on the form.

Each text box also has it's own button to set the font and font size of the current label connected to each individual text box.

The button opens the fontDialog and lets me enter in the specifics and update the label.

But if I go to another text box and do some work, and then return to the first text box again to change the font size, I notice that the font size in the dialog box no longer matches the original font size I chose for that that label.

How can I set things up to tell the fontDialog to remember the font properties of each label so the correct properties are in the fontDialog when I open the fontDialog for a given label?

I hope my question made sense.

I hope to hear from you soon. :)

Thanx in advance for any help you can provide.
Jun 16 '10 #1

✓ answered by Plater

Before showing the FontDialog, populate the Font property with the font you want it to start out as.

3 2118
Plater
7,872 Expert 4TB
Before showing the FontDialog, populate the Font property with the font you want it to start out as.
Jun 16 '10 #2
sly9er
9
Populate the font property of what?

The label, or the font dialog?

If the label, isn't it already populated?

If the font dialog, that is my question. How do I do that?

I need the font dialog to know the font family, and the font size of the label before the font dialog even opens.
Jun 16 '10 #3
sly9er
9
I added this to the font dialog button click event:

FontDialog1.Font = Panel1Heading1Text.Font

Panel1Heading1Text is the name of the label.

Thanks Plater, although you were quite vague about it,

you pointed me in the right direction.

Sort of :)
Jun 16 '10 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Harlin Seritt | last post by:
Is there a way to call up the Font dialog box (at least in the Windows API) from Tkinter or another module? thanks, Harlin Seritt
0
by: Steve Bezner | last post by:
Using System.Windows.Forms.FontDialog there does not appear to be a Flag property in which to set cdlCFNoFaceSel. What I am trying to do is to show the font dialog with no default font selected. ...
1
by: Kathy | last post by:
How do I add a color palette to the font dialog? I want the font dialog to look like the standard Microsoft office Font Dialog but am unable to find any information on how to do this.
1
by: Karl Hungus | last post by:
Is there a way to use truetype fonts not installed on the system, but existing as a file on the server? For example, if I have a true type file in the same directory as my aspx file, can I use that...
1
by: Anthony Nystrom | last post by:
Can someone give me a sample of linking the windows forms component font dialog to a textbox or rtf component... I don't know why I am having trouble with this... Thanks, Anthony Nystrom
1
by: mark | last post by:
For the following document print handler I would like to enable changing the font with some external event. The font dialog returns a font, but I don't understand how to equate that return with...
0
by: iwdu15 | last post by:
hi, im trying to figure out the fotn style and color dialog boxes....how can i get the changes to occur to the selected text and the text typed after? ive been trying but cant figure it out, and if...
1
by: iwdu15 | last post by:
hi, how can i get the font style and color dialog boxes to take affect to the selected text and the text typed after? thanks
0
by: AMP | last post by:
Hello I have a standard font dialog box come up when I click a menu item, but it isnt constrained in the form.How do I do this? Thanks, AMP
0
by: Sven K | last post by:
Hello I need help on an font problem. In my multi-language application i need some special chars(glyphs). So i can not define an own font for all languages and this special signs. I have an...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
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...
0
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...
0
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...
0
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...
0
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...

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.