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. Advertisements

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. DC Gringo
    Replies:
    0
    Views:
    554
    DC Gringo
    Apr 6, 2004
  2. kent
    Replies:
    1
    Views:
    1,028
    Andrew de la Harpe
    May 3, 2004
  3. Simon Prince
    Replies:
    2
    Views:
    3,582
    =?Utf-8?B?TWljaGFlbCBUYXlsb3I=?=
    Oct 19, 2004
  4. Chris Kettenbach

    Listbox selection to populate another listbox?

    Chris Kettenbach, Jun 15, 2005, in forum: ASP .Net
    Replies:
    3
    Views:
    1,873
    Chris Kettenbach
    Jun 16, 2005
  5. bh_jodokast

    Drag from one listbox to another listbox

    bh_jodokast, Oct 7, 2005, in forum: ASP .Net
    Replies:
    0
    Views:
    538
    bh_jodokast
    Oct 7, 2005
  6. COHENMARVIN
    Replies:
    1
    Views:
    708
    =?Utf-8?B?U3JlZWppdGggUmFtKE1DU0QuTkVUKQ==?=
    Oct 14, 2005
  7. John Dalberg

    drag & drop from listbox to listbox?

    John Dalberg, Feb 21, 2006, in forum: ASP .Net
    Replies:
    1
    Views:
    983
    =?Utf-8?B?RFdT?=
    Feb 21, 2006
  8. Jonathan Hyatt
    Replies:
    1
    Views:
    2,995
    Jonathan Hyatt
    Jun 8, 2004
Loading...