473,789 Members | 2,683 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How do I have a UITypeEditor tell the Designer that the component has changed?

Hi,

When I change properties through the property window on my custom control
and then move focus from that property cell VS.Net runs the
GetDesignTimeHt ml() method on my designer. When I implement a UITypeEditor,
change the values, then close the editor nothing happens until I switch the
HTML view (which shows the changes) and then switch back to design view
which then shows the new stuff.

I can get to my component through the Context.Instanc e object in the
EditValue method but I can't figure out how to get a reference to the
designer to call GetDesignTimeHt ml(). When the editor closes and I assign
the value to the property of my control I can set a breakpoint where the
property is assigned the new value but I still can't see how to get a
reference to the designer. How can I call GetDesignTimeHt ml() or get it to
be called after my control changes due to action taken in a custom
UITypeEditor?
***Follow Up:

With the following code in the Set method of my property that gets updated
from the custom UITypeEditor I can all the UpdateDesignTim eHtml() function:

Dim x As New MenuDesigner
x.Initialize(Me )
x.IsDirty = True
x.UpdateDesignT imeHtml()

I overrode the UpdateDesignTim eHtml() function so I could set a breakpoint
and in it I just call the base classes method. When I call this myself, it
gets hit and runs and still nothing changes in the design screen. However,
I added a bogus property that has no editor. When I change it in the
property window and move focus from it, it calls UpdateDesignTim eHtml() and
the updated control instantly renders. I scoured the Designer object when I
hit the break point in the UpdateDesignTim eHtml() function and everything
seems to be set the same regardless of if I call it or VS.Net does. IsDirty
is set to True, it shows the correct ID of the control it is designing for,
all references appear to be identical. What am I missing here?

***2nd Follow Up:

It appears that when I call UpdateDesignTim eHtml() directly,
GetDesignTimeHt ml() is never called. But when VS.Net calls it after
editing a property in the property window, it is
called. What do I need to do to my component to put it in a state where
it'll fire the GetDesign... method when I call the UpdateDesign... method?
I've tried creating a function like this:

Public Sub MarkChange()
Dim c As IComponentChang eService =
DirectCast(GetS ervice(GetType( IComponentChang eService)),
IComponentChang eService)
c.OnComponentCh anging(Me, Nothing)
c.OnComponentCh anged(Me, Nothing, Nothing, Nothing)
End Sub

Which I call before I call the UpdateDesign... method. However it still
doesn't help. Thanks for any input. Ken.

Nov 19 '05 #1
0 1424

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

303
17787
by: mike420 | last post by:
In the context of LATEX, some Pythonista asked what the big successes of Lisp were. I think there were at least three *big* successes. a. orbitz.com web site uses Lisp for algorithms, etc. b. Yahoo store was originally written in Lisp. c. Emacs The issues with these will probably come up, so I might as well mention them myself (which will also make this a more balanced
0
1203
by: public heath vb developer | last post by:
We have several programs that will lose datasets from the designer and / or give compile time errors if a component is changed on the form. This is one of the lines of code that is flagged as an error. Friend WithEvents Release As VersionList.Release Release is a dataset - it has a corresponding .xsd file. The dataset was defined through the designer.
1
1432
by: Raffe | last post by:
Hi all! I've been playing a bit with Component Designer in Visual Studio.NET. Seems to me like a great way to build simple data access components using "point and click". However I can't figure out how to make a component made this way into a component with transactional support which can be put into COM+. The class which is Component Designer ends up with inhertits from System.ComponentMode.Component. I understand that a class which...
0
935
by: Sujith Manuel | last post by:
Hi All, I am developing a Dotnet component in C#, and it has got a set of design time properties which can be changed using the Properties Window. The problem I am facing here is, whenever you drag and drop this component from the component palette, visual studio designer will add some lines of code in the "InitializeComponent" procedure of the Main application, which is giving errors while compiling. The component has got a property...
2
1972
by: Jacob | last post by:
I'm writing a custom component with an accompanying designer. I have the designer set up to notify me of changes to some of the components properties so that I can changed the designer verbs. However, once I change the verbs, the links in the PropertyGrid's command pane won't update unless I click off the component and then back onto it. I've tried everything! Is there a way to force an update of the PropertyGrid command pane from a...
0
1218
by: Mike | last post by:
Hi All, I am using a COM object and so I have to use a form for it to work. The problem is I need to run it as a service as well. When I run it in a test scenario everything works fine and Invoke works as expected. However, when I run it as a service the Invoke command just bombs out without any errors and everything just stops. I have the service installed using an administrator account and interacting with the desktop for testing.
2
2784
by: Ahmed Hashish | last post by:
In building controls we need to create Custom UITypeEditor classes, most of this classes (in my case) doing the same job, its used to support the controls properties with a drop down list contains some string values. My question is, can I summarize all of this classes in one class that takes an array of string as a parameter and used for all controls properties? Thanks Ahmed
13
7890
by: alex sparsky | last post by:
I have a custom collection in my c# winform ui control called Items. Items is a built in collection type that does not allow itself to be replace (you can't 'set' the itemscollection in the control). However, the contents of the Items collection is persisted through designtime. Currently this all works except for the following. When you bring up the custom collection editor and add new items then close the collection editor.
3
2372
by: Tin Gherdanarra | last post by:
A colleague gave me a project where there was a /designer/ window for database connectivity (drag&drop from the toolbox), but I can't find out how to get a /designer/ window in my own project. Shift-F7 does not work. What do I have to do in order to get a /designer/ window? Thanks Tin
0
9666
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9511
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10408
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10199
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10139
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9020
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7529
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6769
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
3
2909
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.