Results 1 to 7 of 7

Thread: "user control" doesn't move

  1. #1

    Thread Starter
    Member
    Join Date
    Sep 2003
    Posts
    43

    "user control" doesn't move

    hello,

    i'm guessing it is a simple problem.

    i created user control which include 3 buttons.

    when i'm adding this control to a form, i can't move it using the mouse .

    the only way to move it is to change the left/top value's in the properties.

    why ?

    many thanks
    eran

  2. #2
    Frenzied Member
    Join Date
    Feb 2003
    Location
    Argentina
    Posts
    1,950
    I don't know. Does it inherit from a moveable control? You may have to code for drag & drop events in the control.

  3. #3

    Thread Starter
    Member
    Join Date
    Sep 2003
    Posts
    43

    welll....

    it inherit from

    Inherits System.Windows.Forms.UserControl

    the funny thing is that using the keyboard i can move the control.

    i can't do so with the mouse (which is the common way).

    what to do ?

  4. #4
    Frenzied Member
    Join Date
    Feb 2003
    Location
    Argentina
    Posts
    1,950
    Just to make sure, it's that you can't move the control in the IDE, not on the runnng form? Sounds dumb, but never hurts to ask.
    I haven't created any user controls in .Net. Is there a Moveable boolean property or similar? Some properties from the base class may have to be overridden.

  5. #5

    Thread Starter
    Member
    Join Date
    Sep 2003
    Posts
    43

    nothing overrides....

    thanks for the reply.

    my problem is when i'm in the IDE (design mode).

    i'm guessing nothing overrides anything because :

    1. it moves when using the arrows in the keyboard.

    2. i didnt' add yet my own methods, properties...

    just to make clear, i don't want that the buttons inside my user control will move. i want to move the whole control.

  6. #6
    Frenzied Member
    Join Date
    Feb 2003
    Location
    Argentina
    Posts
    1,950
    Do you have controls locked? Is there a locked property to the control set to true? Can you move standard controls on the form?

  7. #7

    Thread Starter
    Member
    Join Date
    Sep 2003
    Posts
    43

    maybe this will help

    hello,

    i have costum control which inherits the button class

    Inherits System.Windows.Forms.Button

    i discovered that this control is the cause of the problem.

    when i remove this item from my control, i can move it.


    just to make sure this is the problem, i replaced my costum button with the default one and it worked.


    what should i add my button so it will be ok ?

    thanks
    Eran.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width