[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Joe Stampf

2/12/2004 7:22:00 AM

Does anyone know how to apply the (css) style-builder designer to my custom
webcontrol's style properties?

There has to be a way! I can find documentation on applying url builders
and file dialogs, etc, but not the elusive style-builder!

Help!!!!


2 Answers

CMA

2/12/2004 9:34:00 AM

0

do u need a style builder or how to assign a css to controls..???

to create a css easily u can use VS.NET IDE and make the CSS there. it is
much easier...

to apply css to ur controls, u have to link the css to pages.
in the page header include this.

<LINK href="stylesheet/ILearn.css" type="text/css" rel="stylesheet">

it should within <head>

then think this is sample from css...

..Body
{
FONT-SIZE: 12px;
BACKGROUND-COLOR: #ffffff;
FONT-FAMILY: Arial;
margin-bottom: 0;
margin-left: 0;
margin-right: 0;
margin-top: 0;
}

then assign cssclass or css of the web button or control...
button1.cssclass = "Body";

Note: just type "Body" in design time.

hope this helps,
CMA


"Joe Stampf" <jstampf@msalias.com> wrote in message
news:eEGCXiT8DHA.2116@TK2MSFTNGP10.phx.gbl...
> Does anyone know how to apply the (css) style-builder designer to my
custom
> webcontrol's style properties?
>
> There has to be a way! I can find documentation on applying url builders
> and file dialogs, etc, but not the elusive style-builder!
>
> Help!!!!
>
>


Joe Stampf

2/12/2004 7:04:00 PM

0

Well, I was talking about something rather different, actually, I should
have made it a bit more clear.

On my own custom web control, I have a property (lets call it ReadOnly
Property JoeStyle as CSSStyleCollection) - there is a way to add an
EditorAttribute attribute to the property to cause a certain gui designer to
pop up in the IDE to graphically let you construct the value of the
property. As you mentioned, the CSS StyleBuilder is the one I'm after.

There are several stock designers, if you look at the ones derived from
UITypeDesigner class (in System.Drawing.Design), such as...

System.ComponentModel.Design.CollectionEditor
System.Drawing.Design.FontEditor
System.Drawing.Design.ImageEditor
System.Web.UI.Design.DataBindingCollectionEditor
System.Web.UI.Design.UrlEditor
System.Web.UI.Design.WebControls.DataGridColumnCollectionEditor
System.Web.UI.Design.WebControls.RegexTypeEditor
System.Web.UI.Design.XmlFileEditor
System.Windows.Forms.Design.AnchorEditor
System.Windows.Forms.Design.FileNameEditor


But I have not been able to find how to apply the really nice stock css
stylebuilder designer to my own style property (I thought it would just work
by default based on the property return type, but no such luck!)- or even
locate the stylebuilder designer object!

Thanks for your input, though.



"CMA" <cmallawaarachchi@hotmail.com> wrote in message
news:#nSF5tU8DHA.1428@TK2MSFTNGP12.phx.gbl...
> do u need a style builder or how to assign a css to controls..???
>
> to create a css easily u can use VS.NET IDE and make the CSS there. it is
> much easier...
>
> to apply css to ur controls, u have to link the css to pages.
> in the page header include this.
>
> <LINK href="stylesheet/ILearn.css" type="text/css" rel="stylesheet">
>
> it should within <head>
>
> then think this is sample from css...
>
> .Body
> {
> FONT-SIZE: 12px;
> BACKGROUND-COLOR: #ffffff;
> FONT-FAMILY: Arial;
> margin-bottom: 0;
> margin-left: 0;
> margin-right: 0;
> margin-top: 0;
> }
>
> then assign cssclass or css of the web button or control...
> button1.cssclass = "Body";
>
> Note: just type "Body" in design time.
>
> hope this helps,
> CMA
>
>
> "Joe Stampf" <jstampf@msalias.com> wrote in message
> news:eEGCXiT8DHA.2116@TK2MSFTNGP10.phx.gbl...
> > Does anyone know how to apply the (css) style-builder designer to my
> custom
> > webcontrol's style properties?
> >
> > There has to be a way! I can find documentation on applying url
builders
> > and file dialogs, etc, but not the elusive style-builder!
> >
> > Help!!!!
> >
> >
>
>