Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Building Controls > complex properties (font) on composite controls

Reply
Thread Tools

complex properties (font) on composite controls

 
 
Gentian Hila
Guest
Posts: n/a
 
      01-05-2006
I have a control that is used to get a date (dropdown calendar) and is made
up by a label and three dropdownlists. I overrided the Enabled property so
when it is true/false all of the child controls are Enabled/Disabled.
That was easy. But now I need to change the text size of the composite
control.When I do that, only the text size of the label changes.
If the size would be a property of the WebControls that would be easy. Just
override it and that's it. But size is a subproperty of Font.
How can I make it work ? Any help is appreciated

Thank you
 
Reply With Quote
 
 
 
 
Sergey Poberezovskiy
Guest
Posts: n/a
 
      01-09-2006
I have not tried myself, but why not create a Font property and pass it onto
your controls? Or create a TextSize property and update the Font of your
internal controls in that...

"Gentian Hila" wrote:

> I have a control that is used to get a date (dropdown calendar) and is made
> up by a label and three dropdownlists. I overrided the Enabled property so
> when it is true/false all of the child controls are Enabled/Disabled.
> That was easy. But now I need to change the text size of the composite
> control.When I do that, only the text size of the label changes.
> If the size would be a property of the WebControls that would be easy. Just
> override it and that's it. But size is a subproperty of Font.
> How can I make it work ? Any help is appreciated
>
> Thank you

 
Reply With Quote
 
 
 
 
Ken Baltrinic
Guest
Posts: n/a
 
      01-19-2006
If you control is inheriting from WebControl, look at the documentation for
the CopyBaseAttributes() method. This method can be used to copy all the
standard display attributes from your control to its member controls.
--Ken

"Sergey Poberezovskiy" <(E-Mail Removed)> wrote
in message news:(E-Mail Removed)...
>I have not tried myself, but why not create a Font property and pass it
>onto
> your controls? Or create a TextSize property and update the Font of your
> internal controls in that...
>
> "Gentian Hila" wrote:
>
>> I have a control that is used to get a date (dropdown calendar) and is
>> made
>> up by a label and three dropdownlists. I overrided the Enabled property
>> so
>> when it is true/false all of the child controls are Enabled/Disabled.
>> That was easy. But now I need to change the text size of the composite
>> control.When I do that, only the text size of the label changes.
>> If the size would be a property of the WebControls that would be easy.
>> Just
>> override it and that's it. But size is a subproperty of Font.
>> How can I make it work ? Any help is appreciated
>>
>> Thank you



 
Reply With Quote
 
 
 
Reply

Thread Tools

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 Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Composite Control and accessing complex properties of child controls - C# VS2005 Paul Yanzick ASP .Net Building Controls 4 01-09-2006 01:11 AM
Composite vs non composite Controls Mike ASP .Net Web Controls 4 03-11-2005 05:47 AM
Composite Control - Viewstate management for complex properties Matt T. ASP .Net Building Controls 1 09-11-2004 11:40 AM
web composite controls properties of underlying controls Ziyad Makki ASP .Net 0 07-20-2004 12:39 PM
Composite control with dynamic composite controls sleigh ASP .Net 1 02-12-2004 06:24 PM



Advertisments