473,408 Members | 2,839 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,408 software developers and data experts.

'DO CONTROLS USE PARENT'S FONT??

I have a user control called TextControl on which I have a RichTextBox
control.

TextControl1 is an instance of the User Control on a form.

I do the following in the form:

TextControl1.Font = New Font(FontFamily.GenericMonospace, 10,
FontStyle.Regular, GraphicsUnit.Point)

And the RichTextBox takes on the specified font - which is what I wanted but
why does it happen?

Does a control (RichTextBox) use the parent's (UserControl) font sometimes??

Thanks in advance
Nov 20 '05 #1
2 1464
Yep, controls will use the parents font until you change it. Like you did.
" SamSpade" <st**************@REMOVEaol.com> wrote in message
news:eX*************@TK2MSFTNGP11.phx.gbl...
I have a user control called TextControl on which I have a RichTextBox
control.

TextControl1 is an instance of the User Control on a form.

I do the following in the form:

TextControl1.Font = New Font(FontFamily.GenericMonospace, 10,
FontStyle.Regular, GraphicsUnit.Point)

And the RichTextBox takes on the specified font - which is what I wanted but why does it happen?

Does a control (RichTextBox) use the parent's (UserControl) font sometimes??
Thanks in advance

Nov 20 '05 #2
Actually I changed the usedcontrol's font and the control on it reflected
the change.
Thanks for the info
"yEaH rIgHt" <nospam@haha> wrote in message
news:10*************@corp.supernews.com...
Yep, controls will use the parents font until you change it. Like you did.
" SamSpade" <st**************@REMOVEaol.com> wrote in message
news:eX*************@TK2MSFTNGP11.phx.gbl...
I have a user control called TextControl on which I have a RichTextBox
control.

TextControl1 is an instance of the User Control on a form.

I do the following in the form:

TextControl1.Font = New Font(FontFamily.GenericMonospace, 10,
FontStyle.Regular, GraphicsUnit.Point)

And the RichTextBox takes on the specified font - which is what I wanted

but
why does it happen?

Does a control (RichTextBox) use the parent's (UserControl) font

sometimes??

Thanks in advance


Nov 20 '05 #3

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

Similar topics

1
by: discomiller | last post by:
Mario Mueller: Hello *, radiobuttons belong to other radiobuttons by the "name="any_value"" attribut. Thats a fakt. I got the following XML:...
1
by: Paul Gobée | last post by:
What is the parent element of a button (IE6 on Win, transitional mode)? Is it the BODY, the browser default stylesheet, or something else? Contra "body is parent-element": - Buttons with no...
7
by: Bil Muh | last post by:
Esteemede Developers, I would like to Thank All of You in advance for your sincere guidances. I am developing a software using Visual C++ .NET Standard Edition with Windows Form (.NET)...
1
by: et | last post by:
I have the situation where a C# dll is loaded and it provides some controls to display, I wrap the controls in some nice group boxes, and later on I dispose of the group boxes, making sure I remove...
1
by: bill yeager | last post by:
I did some more debugging and found the following: 1) I placed the following code in the button event just to see if I could cycle thru the datagrid control collection: <code> Dim strhello As...
4
by: Jim in Arizona | last post by:
This doesn't make any sense to me. I'm hoping some SQL guru out there knows the answer. I'm making a help desk type database system. There's only two tables, one called TTickets and the other...
0
by: Mike Collins | last post by:
I someone can please help, I am about at an end in trying to figure this out. I am adding some dynamic controls to my page (I found out that I was supposed to be doing that in the oninit event,...
1
by: Martin | last post by:
Hi all ! I use Visual Studio .NET 2005 SP1 (+ Updates for Vista) on Windows Vista. I have a strange problem in a WinForm application. In a UserControl, which inherit another UserControl...
7
by: WT | last post by:
Hello, It seems that when a control is set into a ContentPlaceHolder in a page using a MasterPage, it's id is change and FindControl(ID) no more works, is it normal, how to override this or...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
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,...
0
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...
0
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,...
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...

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.