UserControl problem

Discussion in 'ASP .Net Web Controls' started by Dave Johnson, Dec 14, 2005.

  1. Dave Johnson

    Dave Johnson Guest

    I'm trying to create a UserControl that contains a combo box, a text box
    and
    a check box. The one that is displayed depends on the value of a
    property.
    All three of those controls have their DockStyle set to Fill. Here's the
    problem, the UserControl isn't moveable at design time. I can drop it on
    a
    form, and I can move it if I change the Location property. However, I
    can't
    drag it to a new location. Any suggestions?

    I do have a custom designer for it which overrides the SelectionRules
    property like this:

    public override SelectionRules SelectionRules {
    get {
    if( this.controlType == ControlType.CheckBox ) {
    return
    SelectionRules.AllSizeable |
    SelectionRules.Visible |
    SelectionRules.Moveable;
    } else {
    return
    SelectionRules.LeftSizeable |
    SelectionRules.RightSizeable |
    SelectionRules.Visible |
    SelectionRules.Moveable;
    }
    }
    }





    *** Sent via Developersdex http://www.developersdex.com ***
    Dave Johnson, Dec 14, 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. huobazi
    Replies:
    1
    Views:
    682
    David Waz...
    Jul 3, 2003
  2. Rajesh Tiwari

    Can we use a usercontrol inside a usercontrol

    Rajesh Tiwari, Aug 12, 2003, in forum: ASP .Net
    Replies:
    0
    Views:
    409
    Rajesh Tiwari
    Aug 12, 2003
  3. nail
    Replies:
    0
    Views:
    1,539
  4. Phl
    Replies:
    2
    Views:
    521
    =?Utf-8?B?VGFtcGEgLk5FVCBLb2Rlcg==?=
    Nov 18, 2004
  5. Mark van Bree

    Postback problem with usercontrol in usercontrol

    Mark van Bree, May 30, 2006, in forum: ASP .Net Web Controls
    Replies:
    1
    Views:
    163
Loading...

Share This Page