Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Custom Combo Error
Message
From
05/07/2008 12:36:44
 
General information
Forum:
ASP.NET
Category:
Coding, syntax and commands
Miscellaneous
Thread ID:
01329113
Message ID:
01329118
Views:
15
>I create a combo class as follows. When I drop it onto a user control and compile I get the error
>"The type name '_ComboBase' does not exist in the type 'ComboTree.ComboTree'".


Not sure where "ComboTree.ComboTree" comes from ... is the second ComboTree the name of your user control that you're dropping this on? did the _ComboBase class compile ok? Maybe that's where your error actually is ... did you need to add a reference to another project? So many possible reasons for this error to appear ...

~~Bonnie



>
>
>
>
>namespace ComboTree
>{
>    public class _ComboBase : ComboBox
>    {
>        // Event to handle when the down arrow is clicked
>        public event EventHandler ArrowClicked;
>
>        //
>        protected virtual void OnArrowClicked(EventArgs e)
>        {
>            if (this.ArrowClicked != null)
>            {
>                this.ArrowClicked(this, e);
>            }
>        }
>
>        // Overwrite the WndProc event to
>        protected override void WndProc(ref System.Windows.Forms.Message m)
>        {
>
>            if (m.Msg == 0x201 || m.Msg == 0x203)  //WM_LBUTTONDOWN or WM_LBUTTONDBLCLK
>            {
>                // Raise the event
>                this.OnArrowClicked(new EventArgs());
>
>                // Pevent the list from opening
>                return;
>
>            }
>            base.WndProc(ref m);
>        }
>    }
>}
>
Bonnie Berent DeWitt
NET/C# MVP since 2003

http://geek-goddess-bonnie.blogspot.com
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform