Results 1 to 5 of 5

Thread: Reference to the control that provides the properties in UITypeEditor??

  1. #1

    Thread Starter
    PowerPoster i00's Avatar
    Join Date
    Mar 2002
    Location
    1/2 way accross the galaxy.. and then some
    Posts
    2,388

    Reference to the control that provides the properties in UITypeEditor??

    I am using ProvideProperty to add extra properties to other controls on a form..

    I have a UITypeEditor and in EditValue I can get a reference to the control that has been provided to (context.Instance) ...
    but how can I get a reference to the actual instance that is doing the providing the property to the other controls??

    Thanks in advance,
    Kris

  2. #2

    Thread Starter
    PowerPoster i00's Avatar
    Join Date
    Mar 2002
    Location
    1/2 way accross the galaxy.. and then some
    Posts
    2,388

    Re: Reference to the control that provides the properties in UITypeEditor??

    *Shameful bump

  3. #3
    Angel of Code Niya's Avatar
    Join Date
    Nov 2011
    Posts
    8,600

    Re: Reference to the control that provides the properties in UITypeEditor??

    Quote Originally Posted by i00 View Post
    *Shameful bump
    You may want to think about asking these types of questions over at StackOverflow. The reason is because when it comes to this level of control development, using UITypeEditors, designers and all that, you would find that very few people here have actually ever dealt with them. You are the only person other than myself that I know of on these forums that have actually gone this deep into custom control development. In fact, it was a similar question that brought me to VBForums in the first place. It went unanswered for years before I finally solved it myself.

    As for your question.....even though I've dealt with this kinda thing myself, it's been a couple years since I even looked at code concerning custom controls. My memory is quite a bit foggy. I'll will have to go back into some of my older projects and re-familiarize myself with UITypeEditors and designers etc. I wanna get a couple things off my plate first so I can't spare the time to do it at the moment but I will keep this question in mind if I find the time. Your question doesn't seem unreasonable and I'm sure it can be done. I just can't remember much about this stuff at the moment. Been away from it too long.

    As for StackOverflow, I find that there are a lot of guys there that really go into the guts of things. Answering your question is really about getting into the guts of Visual Studio and the .Net Framework, a place where you will find few others that can actually help. It's still no guarantee they would have the answer to your question but StackOverflow is usually the best bet when you want answers to deeper questions within a restricted domain like this. Writing designer code isn't something your typical VB.Net developer has experience in.
    Last edited by Niya; Dec 20th, 2017 at 01:22 PM.
    Treeview with NodeAdded/NodesRemoved events | BlinkLabel control | Calculate Permutations | Object Enums | ComboBox with centered items | .Net Internals article(not mine) | Wizard Control | Understanding Multi-Threading | Simple file compression | Demon Arena

    Copy/move files using Windows Shell | I'm not wanted

    C++ programmers will dismiss you as a cretinous simpleton for your inability to keep track of pointers chained 6 levels deep and Java programmers will pillory you for buying into the evils of Microsoft. Meanwhile C# programmers will get paid just a little bit more than you for writing exactly the same code and VB6 programmers will continue to whitter on about "footprints". - FunkyDexter

    There's just no reason to use garbage like InputBox. - jmcilhinney

    The threads I start are Niya and Olaf free zones. No arguing about the benefits of VB6 over .NET here please. Happiness must reign. - yereverluvinuncleber

  4. #4
    You don't want to know.
    Join Date
    Aug 2010
    Posts
    4,578

    Re: Reference to the control that provides the properties in UITypeEditor??

    Yeah, you really want visibility here and you should not be afraid to pretend you're asking a C# question.

    There are MAYBE 1,000 people who give a flip about design-time in the world. I'm extremely surprised there are two of them on these forums. But I'm out of practice and haven't messed with WinForms design time since about 2011 and it sounds like Niya's in a similar state. There's just... not a lot of money in it.

    So you need to ask your questions in a place where more than two people might see it. The C# section of StackOverflow is the best place. That's where the most people who either already know or are bored and will wade through documentation to find out will be.

    But it could still be that you don't get an answer at all :/
    This answer is wrong. You should be using TableAdapter and Dictionaries instead.

  5. #5
    Angel of Code Niya's Avatar
    Join Date
    Nov 2011
    Posts
    8,600

    Re: Reference to the control that provides the properties in UITypeEditor??

    Quote Originally Posted by Sitten Spynne View Post
    Yeah, you really want visibility here and you should not be afraid to pretend you're asking a C# question.
    This cannot be overstated. I can't believe I forgot to mention this myself. I haven't looked for VB.Net code in years now. When I search for ways to do things in VB.Net, I always look for C# code. There's just so much more C# code out there. I think the Unity Engine has something to do with this exploding popularity of C# but that's another topic.

    Quote Originally Posted by Sitten Spynne View Post
    I'm extremely surprised there are two of them on these forums.
    There maybe more VBF members than the three of us here that have done designer related stuff. I vaguely remember coming across some CodeBank stuff that had some extra designer functionality. But still, the number of people on these Forums that have done it is still very low. Too low to make a difference. As you said, visibility is the problem. The chances that the right people to help with these questions are going to be around when they come up is far too low, bordering on never. There are like 100 people ready to answer an ADO related question at any given moment but only 2 or 3, if you're that lucky, when designer related questions come up. I learned that the hard way.

    It doesn't make VBForums bad or anything. It's just a matter of numbers really. The active membership here is very small, so the diversity of experience here will also be very small. This small collective experience also tends to lean in more popular domains of development like CRUD applications.
    Treeview with NodeAdded/NodesRemoved events | BlinkLabel control | Calculate Permutations | Object Enums | ComboBox with centered items | .Net Internals article(not mine) | Wizard Control | Understanding Multi-Threading | Simple file compression | Demon Arena

    Copy/move files using Windows Shell | I'm not wanted

    C++ programmers will dismiss you as a cretinous simpleton for your inability to keep track of pointers chained 6 levels deep and Java programmers will pillory you for buying into the evils of Microsoft. Meanwhile C# programmers will get paid just a little bit more than you for writing exactly the same code and VB6 programmers will continue to whitter on about "footprints". - FunkyDexter

    There's just no reason to use garbage like InputBox. - jmcilhinney

    The threads I start are Niya and Olaf free zones. No arguing about the benefits of VB6 over .NET here please. Happiness must reign. - yereverluvinuncleber

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