Readonly listbox

Discussion in 'ASP .Net Building Controls' started by Johno, Aug 12, 2005.

  1. Johno

    Johno Guest

    I'm developing a set of WebControls that can be toggled between Readwrite and
    Readonly modes. They are each inherited from their standard webcontrol but
    implement an IReadOnly interface and override the Render method to render the
    control as readonly. So for exemple, I'm rendering checkboxes as themselves
    in read/write mode and as an <IMG src="checkbox.gif"/> in read-only mode. All
    works fine but I'm stuck on the ListBox control. My approach to this has been
    to render the readonly ListBox as a fixed-height and width <UL> containing
    <LI>s with the selected list items displayed with the highlight color. But
    here's the issue: how do I determine the height and width of the <UL> for
    rendering? I could rely on the control user to explicitly set the height and
    width properties of the Readwrite/ReadOnly ListBox descendent but that
    solution is far from satisfactory.

    Any ideas on how I can get around this problem?

    TIA

    Johno
     
    Johno, Aug 12, 2005
    #1
    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. blenderdude
    Replies:
    0
    Views:
    1,149
    blenderdude
    Aug 3, 2003
  2. DC Gringo
    Replies:
    0
    Views:
    421
    DC Gringo
    Apr 6, 2004
  3. kent
    Replies:
    1
    Views:
    909
    Andrew de la Harpe
    May 3, 2004
  4. Simon Prince
    Replies:
    2
    Views:
    3,383
    =?Utf-8?B?TWljaGFlbCBUYXlsb3I=?=
    Oct 19, 2004
  5. Jonathan Hyatt
    Replies:
    1
    Views:
    2,135
    Jonathan Hyatt
    Jun 8, 2004
Loading...

Share This Page