Width and Height Properties - WebControl

Discussion in 'ASP .Net Web Controls' started by Mythran, Sep 12, 2005.

  1. Mythran

    Mythran Guest

    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
    Mythran, Sep 12, 2005
    #1
    1. Advertising

  2. Mythran

    Mythran Guest

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

    Mythran

    "Mythran" <> wrote in message
    news:%...
    >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
    >
    Mythran, Sep 12, 2005
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Nathan Sokalski
    Replies:
    2
    Views:
    459
    =?Utf-8?B?R2FyeSBL?=
    Jun 15, 2005
  2. Lois
    Replies:
    1
    Views:
    3,187
    Ryan Stewart
    Dec 27, 2004
  3. Bernd Meier
    Replies:
    6
    Views:
    499
    GTalbot
    Jan 14, 2008
  4. Nathan Sokalski

    Specifying Width and Height properties as percentages

    Nathan Sokalski, Jun 13, 2005, in forum: ASP .Net Building Controls
    Replies:
    2
    Views:
    116
    Gary K
    Jun 15, 2005
  5. Nathan Sokalski

    Specifying Width and Height properties as percentages

    Nathan Sokalski, Jun 13, 2005, in forum: ASP .Net Web Controls
    Replies:
    2
    Views:
    111
    Gary K
    Jun 15, 2005
Loading...

Share This Page