Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Windows Forms / Design Time / June 2007

Tip: Looking for answers? Try searching our database.

PropertyGrid.PropertyValueChanged in Design-Time

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
mobilemobile - 30 Apr 2007 18:24 GMT
I'm not even sure if this is possible, but is there a way to access the
PropertyGrid in design-time -- how to access the grid in the property pane in
the VS IDE?

I want to use the PropertyValueChanged event in design-time -- I can use it
in runtime of course if I create a form with the PropertyGrid control on it.

Thanks for any help,
Steve
G Himangi - 02 May 2007 05:51 GMT
AFAIK, accessing the propertygrid instance used by VS.Net is not possible

---------
- G Himangi,   Sky Software       http://www.ssware.com
Shell MegaPack : GUI Controls For Drop-In Windows Explorer like Shell
Browsing Functionality For Your App (.Net & ActiveX Editions).
EZNamespaceExtensions.Net : Develop namespace extensions rapidly in .Net
EZShellExtensions.Net : Develop all shell extensions,explorer bars and BHOs
rapidly in .Net
---------

> I'm not even sure if this is possible, but is there a way to access the
> PropertyGrid in design-time -- how to access the grid in the property pane
[quoted text clipped - 8 lines]
> Thanks for any help,
> Steve
mobilemobile - 03 May 2007 02:44 GMT
OK.

Well, here's what I would like to do -- maybe there's a different way.

I have two properties for a custom control that need to affect each other,
so I need to be able to trap when each property change.  So if my Value
property changes, I need to do something to my Text property and vice versa.  
Right now, I don't see the change in the grid until I've clicked on the other
property -- e.g., if the Value property changes, the Text property doesn't
change in the property pane, but when I click on the Text property, it
changes (without me doing anything else).

Any ideas?  (BTW, I'm cross-posting this to
microsoft.public.dotnet.framework.windowsforms.)

Thanks for any help,
Steve

> AFAIK, accessing the propertygrid instance used by VS.Net is not possible
>
[quoted text clipped - 19 lines]
> > Thanks for any help,
> > Steve
G Himangi - 05 May 2007 11:56 GMT
Apply

[RefreshProperties(RefreshProperties.All)]

to both your properties

---------
- G Himangi,   Sky Software       http://www.ssware.com
Shell MegaPack : GUI Controls For Drop-In Windows Explorer like Shell
Browsing Functionality For Your App (.Net & ActiveX Editions).
EZNamespaceExtensions.Net : Develop namespace extensions rapidly in .Net
EZShellExtensions.Net : Develop all shell extensions,explorer bars and BHOs
rapidly in .Net
---------

> OK.
>
[quoted text clipped - 43 lines]
>> > Thanks for any help,
>> > Steve
jokiz - 12 May 2007 03:33 GMT
first of all, you can interact with visual studio through EnvDTE.  but
that's not the solution for your problem,  all you have to do is
change the related property from the setter of the other not using
their setter but through TypeDescriptor which automatically notifies
the designer so it gets reflected in the property grid at real time.
there have been a number of queries like this in this newsgroup, you
can try searching for the syntax, something like
TypeDescriptor.GetProperties(myComponent)
["PropertyName"].SetValue(myComponnet, value)
> Apply
>
[quoted text clipped - 58 lines]
> >> > Thanks for any help,
> >> > Steve
jokiz - 12 May 2007 04:17 GMT
first of all, you can interact with visual studio through EnvDTE.  but
that's not the solution for your problem,  all you have to do is
change the related property from the setter of the other not using
their setter but through TypeDescriptor which automatically notifies
the designer so it gets reflected in the property grid at real time.
there have been a number of queries like this in this newsgroup, you
can try searching for the syntax, something like
TypeDescriptor.GetProperties(myComponent)
["PropertyName"].SetValue(myComponnet, value)
> Apply
>
[quoted text clipped - 58 lines]
> >> > Thanks for any help,
> >> > Steve
mobilemobile - 01 Jun 2007 03:46 GMT
Thanks for the info -- that worked!

Steve

> Apply
>
[quoted text clipped - 58 lines]
> >> > Thanks for any help,
> >> > Steve

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.