From: Mr. X. on 15 Apr 2010 15:13 Another thing. Look at menuStrip control. When putting it on form on design time, there are inner item elements, that can be shown too (with events ...) That's kind of behavior, that I want to. Thanks :) "Armin Zingler" <az.nospam(a)freenet.de> wrote in message news:OihkTYJ3KHA.1624(a)TK2MSFTNGP06.phx.gbl... > Am 15.04.2010 06:30, schrieb Mr. X.: >> I need to see the label's event directly via the IDE. > > "IDE" is a big term. The designer or the code editor? > If you use the Addhandler statement as I've suggested, > intellisense works as always and will list the events. > >> (I want to be able to make a user control - built it, put it on the my >> form, >> and see some of the inner elements of the controls, and be able to see >> their >> events and properties on the IDE). >> How can I do that ? >> Any other way ? (like populate all the properties and events of the inner >> control, to the main user control - but if there are 100 properties, I.e >> ?) > > The designer just simplifies creating code. What you want is not a > feature. > You have to type "Addhandler MyUsercontrol1.MyLabel." and have > intellisense > list the events. (BTW, I'v never used the events view in the properties > window) > > -- > Armin
From: Armin Zingler on 15 Apr 2010 15:40 Am 15.04.2010 21:13, schrieb Mr. X.: > That's kind of behavior, that I want to. Yes, but it's not what you get. -- Armin
From: Mr. X. on 16 Apr 2010 04:37 Sorry, but I missed something. There are some user-control, as just for example : MenuStrip, that has MenuStripItem, which I can click on MenuStripItem, and change its properties and events. I thought that's I can build my own user control, and at the same way change the inner controls at design time. Can I do that (at the same way MenuStrip could do that) ? Thanks :)
From: Armin Zingler on 16 Apr 2010 07:15 Am 16.04.2010 10:37, schrieb Mr. X.: > Sorry, but I missed something. > > There are some user-control, as just for example : MenuStrip, MenuStrip is, as an aside, no usercontrol. > that has > MenuStripItem, which I can click on MenuStripItem, which is a Component but not a control. That means, the difference between a menustrip and a usercontrol is that the menustripitems are not contained in the Controls collection of the MenuStrip. > and change its properties yep, properties > and events. Never noticed that, because, as I said, I never use the events in the properties window, and the only event of interest with a MenuStripItem is the click event, and that one is created when I double-click on it. But that's just me. You are absolutely right. Well, it's the MenuStrip designer that works that way. The Usercontrol designer doesn't. > I thought that's I can build my own user control, and at the same way change > the inner controls at design time. > Can I do that (at the same way MenuStrip could do that) ? As I've already carefully tried to express: No, you can't do that. :-) I guess the reason is that a Usercontrol should encapsulate all it's functunality in most cases, and there's not sufficient request for the remaining cases. Ddon't know. Maybe someone knows how to extend the IDE with such a feature. Look if it's already been requested. If not, you can do it: https://connect.microsoft.com/VisualStudio/feedback/ -- Armin
From: Mr. X. on 16 Apr 2010 12:46
O.K. I created a class object, with properties. Add the class to toolbar. I didn't check the whole functionality (I created also a b = button, and did b.parent = parent, but didn't see it on form). It seems I can control the behavior, and not persist using userControl. Problem was solved partially. Anyway, thanks :) "Armin Zingler" <az.nospam(a)freenet.de> wrote in message news:#epOxcV3KHA.4332(a)TK2MSFTNGP02.phx.gbl... > Am 16.04.2010 10:37, schrieb Mr. X.: >> Sorry, but I missed something. >> >> There are some user-control, as just for example : MenuStrip, > > MenuStrip is, as an aside, no usercontrol. > >> that has >> MenuStripItem, which I can click on MenuStripItem, > > which is a Component but not a control. That means, the difference > between a menustrip and a usercontrol is that the menustripitems > are not contained in the Controls collection of the MenuStrip. > >> and change its properties > > yep, properties > >> and events. > > Never noticed that, because, as I said, I never use the events in the > properties > window, and the only event of interest with a MenuStripItem is the click > event, > and that one is created when I double-click on it. > > But that's just me. You are absolutely right. Well, it's the MenuStrip > designer > that works that way. The Usercontrol designer doesn't. > >> I thought that's I can build my own user control, and at the same way >> change >> the inner controls at design time. >> Can I do that (at the same way MenuStrip could do that) ? > > As I've already carefully tried to express: No, you can't do that. :-) > I guess the reason is that a Usercontrol should encapsulate all it's > functunality in most cases, and there's not sufficient request for > the remaining cases. Ddon't know. > > Maybe someone knows how to extend the IDE with such a feature. > > Look if it's already been requested. If not, you can do it: > https://connect.microsoft.com/VisualStudio/feedback/ > > -- > Armin |