Width and Height Properties - WebControl

M

Mythran

I have a web control, that doesn't work exactly the way I want it to..so I
will explain what I want and compare what I have (too lengthy to explain
exactly what I have)..

WebControl Properties:
Value (decimal)
PositiveStyle (style)
NegativeStyle (style)
ZeroStyle (style)

When the value is positive, use PositiveStyle; negative, use NegativeStyle;
and 0 or empty, use ZeroStyle. When I resize the webcontrol using the
mouse, I want the Width and Height properties of the web control to change
(not the style properties). If the user sets the Width property of the web
control, I want it to over-ride the sub-style properties. If the user sets
the sub-style properties, I want those to override the CssClass stylesheet
settings (which it does, already).

Right now, when I set PositiveStyle, because I use
MyBase.ControlStyle.CopyFrom and pass in the sub-style to copy from, the
Width/Height properties of the control get set to those of the style
properties. If I try to change the Width or Height property values to a
different value, they revert back to the style property value in effect.
Also, if I change the style properties and clear them out, the value of the
Width/Height properties don't clear.

Hope I explained well enough, if not, please let me know :)

Thanks,
Mythran
 
M

Mythran

Nevermind, figured it out using the current style and calling it's
AddAttributesToRender before I call MyBase.AddAttributesToRender. :)

Mythran
 

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,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top