style builder designer!?

J

Joe Stampf

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!!!!
 
C

CMA

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
 
J

Joe Stampf

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,051
Latest member
CarleyMcCr

Latest Threads

Top