Inheriting a control

Ask a Question related to ASP.NET Building Controls, Design and Development.

  1. #1

    Default Inheriting a control

    Hi,
    Firstly, I'm not using ASP , I'm using winForms but I can't seem to find a
    winforms building controls thread. If anybody knows of such a thread in this
    forum I'd be most grateful.

    The problem I'm having is I'm creating a control using a class library. This
    class is inheriting a Checkbox. I want to create a simple Toggle Button
    control.

    After setting a reference to the windows forms dll, I inherit the checkbox
    class in the normal fashion:

    public class MyToggleButton : CheckBox{//code here}

    I build ok.

    When I add a reference to this assembly, it recognises the reference but no
    control appears on my MyUserControls tab. Why is this so?

    I have created controls using control libraries with no problems. Why can't
    I inherit from a standard control & see it on MyUserControls?

    Thanks for any clues in advance.
    Ant
    Ant Guest

  2. Similar Questions and Discussions

    1. Event Bubbling Custom Object not inheriting from control
      One of the new things flash flex and xaml have are ways which the event easily bubbles up to a parent that knows how to handle the event. Similar...
    2. Allowing a new design property for control inheriting DataGrid
      Hi, I created a custom control inheriting from DataGrid I would like to put a custom property for design time manipulation I added the...
    3. Inheriting Custom Control
      Not sure I fully understand your question, but just like you would from any other control... e.g. public class NewControl : BaseControl
    4. Problem inheriting from the list control
      Hello, I am trying to develop and ASP.NET custom control. I want to change the rendering of the list control. So I inherited from the list and I...
    5. inheriting toolbar control
      Hi ... I trying to inherit from toolbar . '==clsMizUwg.vb== <Assembly: TagPrefix("ctlmizUwg.nmmizUwg", "miz")> Namespace nmmizUwg
  3. #2

    Default RE: Inheriting a control

    Hi,

    I worked out how to add it, by using the Add/Remove items on the tool box.
    But this leaves me with a question.

    Why do I need to add a referene to a control library from the project menu

    but I need to use Add/Remove to add a class library control? what is the
    difference?

    Thanks for any thoughts
    Ant



    "Ant" wrote:
    > Hi,
    > Firstly, I'm not using ASP , I'm using winForms but I can't seem to find a
    > winforms building controls thread. If anybody knows of such a thread in this
    > forum I'd be most grateful.
    >
    > The problem I'm having is I'm creating a control using a class library. This
    > class is inheriting a Checkbox. I want to create a simple Toggle Button
    > control.
    >
    > After setting a reference to the windows forms dll, I inherit the checkbox
    > class in the normal fashion:
    >
    > public class MyToggleButton : CheckBox{//code here}
    >
    > I build ok.
    >
    > When I add a reference to this assembly, it recognises the reference but no
    > control appears on my MyUserControls tab. Why is this so?
    >
    > I have created controls using control libraries with no problems. Why can't
    > I inherit from a standard control & see it on MyUserControls?
    >
    > Thanks for any clues in advance.
    > Ant
    Ant Guest

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139