Property Grid - Open A Dialog Box To Edit A Property?

Oct 29, 2009

Property Grid - Open a dialog box to edit a property?

View 1 Replies


ADVERTISEMENT

Use Property Grid In A Form To Edit Any Type?

Jul 22, 2009

I have an App where I'd like to be able to edit any type (font, colour, point etc.) at run time and use any of the .Net default type editors. (e.g., font/ colour picker).

Rather than re-invent the wheel, I decided to use the property grid control.

If I pass an object of, say font, to the grid, it lists all the fields separately, with no option to open the font picker.[code]...

View 1 Replies

Open/save Dialog Property?

Feb 15, 2011

what the open/save dialog property, AutoUpgradeEnabled means? I have tried it on VS2005, 2008 and 2010. WHen enabled it delays returning the filename you choose for up to 5 seconds.

View 2 Replies

VS 2008 - Property Grid - Click On Item Show Its Property

Mar 18, 2009

I have a listbox with several list items added. I want that as user click on an item, I should be able to show its property. This should change for different items. For example (hypothetical) : Listbox has numbers 1 - 10. Now when I select 1 I should be able to set property - Name, Lastname, Colour, Age.

When I select 2 I should be able to set - Age, Hair Colour (clr shows), Weight, Date. When I select 3 then - City (combo box drop down), Country, Age only. This way value changes for diff items. One way is to put them in property grid and show them. Though this looks nice but adding/removing items in that is not easy. You need to have a class that refer that to prop grid. Do I have to code for each classes for all values in listbox or is there an easier way to manage items in property grid. If you think prop grid is not the right tool for such an activity then can you suggest something else.

View 13 Replies

IDE :: Make A Property In A Property Grid A List Box In 2010?

Feb 21, 2011

I have the following property in a property grid in VB.Net 2010.

<Description("Rapid Entry Post Car Wash Settings CarWashOptionPushButtons"), _
Category("Post Car Wash")> _
Public Property CarWashOptionPushButtons() As String

[code]....

I need to make this property a list box that gets the values from a database table and populates the list box with the values from the table. I have tried numerous things to no avail.

View 4 Replies

Net Property Grid. Is There A Way To Let The Grid Manipulate Object In Different Way

May 31, 2009

As I understood , The property grid is given an object which it can manipulate by extracting its Properties using reflections.

My problem is that I have a set of Parameters that is determined during run-time , thus I can't staticly compose a class with properties to represent this set.

I have two idea in mind to solve this problem but both are complex and will probably consume lot of time , infact i will say they are not practical under my time constraints. One is to use Reflection Emit in order to define a class dynamically and the other is to dynamiclly build a C# source file and then compile it using CodeDom.

Can Property grid behave in a different manner( other then extracting the Properties of an object using reflections ) that can suite my problem?

I want to say that the reason I went to the property grid from the begining was its ability to provide realy nice Data Retrieval UI for common types.For color you autometically get a palette , For dataTime you automatically have a nice calender. I would like to get those things automatically If possible.

View 1 Replies

.net - 'Property' Cannot Implement 'Property' Because There Is No Matching Property On Interface 'IName'?

Dec 9, 2011

I'm having some very weird issues with interfaces right now.

I have a very simple setup. In one of my class, I have a Property implementing a Property from an Interface.

In my class it's like:

Private _oForm As IForm
Public Property Form As IForm Implements IContainer.Form
Set(value As IForm)

[Code]...

I have like dozens of interfaces like this working throughout my project and I can't believe this simple one can't work!

View 1 Replies

Edit File Property 'Company'?

May 27, 2011

I was wondering how I can set a file's properties? I'm talking about the fields, author, company etc. I found a way of doing it through Word's builtin properties. But it's a little buggy. So I was wondering if it's possible to do that in other ways?I have this code that works for all Word document files except *.doc format it seems.This is the code I have so far, one text box and one button. The button runs findDocLoop()[code]I know it can probably be done better, but I'm kinda in a hurry. I just noticed when I set a break point right after the code sets the value of the property. I set Word to be open, got in there and checked the property value. And it was actually set!. But after the save phaze, it seems to be lost. Or "reset" to some Office defaults.

View 1 Replies

Combo Box And A Property Grid In A Form?

Dec 15, 2011

I have a combo box and a property grid in a form. The combo box contains 2 items. If one item is selected, two properties are listed in the property grid. These properties should have a dropdown that contains a list of items. I have two string arrays that contain the values for these properties. Can I use one TypeConverter that inherits StringConverter for these lists to be displayed in two different properties? That is, with one TypeConverter class, can I populate both the lists? I will also have to do the same with the other items in the combo box.

View 2 Replies

Multiline Drop Down In Property Grid?

Jun 9, 2010

When you drop down the Text property for a label you get a box that allows text entry spanning multiple lines.My question is how do i use this feature in my own control properties?

View 2 Replies

Property Grid Collapsable Sections

Sep 20, 2010

The only thing I am coming up with in my searches is stuff to do with expandable type converters, and all of that documentation is a bit over my head as trying all the examples is failing horribly. I would assume that there is an easier way to go about this without junking up my code with more stuff I don't understand.[code]Now, variables 1-5 have to go under section1, which is what is going on now. However, I want to group together variables 1-4, then group together variables 5-8, so they have the plus sign and can expand. But I cannot apply another category to any of these as they already have a category. All of the other things I have tried putting in additional "<tryexpand("notgonnawork")> _" sections does exactly that, not gonna work.

View 10 Replies

Grid - How To Set DataField Property By Code In C1flexgrid

Dec 4, 2009

I am useing C1FlexGrid and i set the datatable as c1flexgrid's datasource. now i want to map filed of datatable to columns of c1flexgrid by code.

View 1 Replies

VS 2008 Flag Enums In Property Grid

Jul 10, 2009

I have a flags enumeration property that I need to show in a property grid: [Code] In the property grid however, it only allows me to select a single value. I cannot combine the values like usual in a flags enum. How do I show something like a checked listbox in the property grid, so that the user can combine flags by checking items? A None and All item would be great but not required. [url]

But even that does not work properly. It seems to check and uncheck items arbitrarily. If you check the first and fourth item for example, the second and third items will sometimes be checked too. Yes, I realize that is supposed to happen with the TestEnum property (as that defines 'BottomRight' as 'Bottom Or Right', so that's logical), but it also happens with the SecurityFlags for example, which it shouldn't.

View 2 Replies

VS 2008 Property Grid Sub Items To Have Properties Too?

Dec 5, 2011

i have a clsTest with the following layout:

vb
Public Class clsTest
Public Property Test1 as string
'...

[code]....

how can i make it so when i show clsTest's properties in a propertygrid it has the ability to expand clssettings properties? (kind of how font does it on a text box for example)

View 5 Replies

Edit Custom Control Property - Background Not Changing

Nov 15, 2010

I have created several simply custom controls and I used them in my app. Now, I changed the background color in a custom control class, because I wanted an other color for this type of control. But in my app, the background of this controls didn't change. Why? I assume, I don't need to place again this controls on each forms to get the new background color, or do I? If yes, this is very stupid in my opinion.

View 4 Replies

C# - Add A Service To The Type Descriptor Context Of A Property Grid In .Net?

Apr 13, 2010

I have an app that allows the user to choose an image, at design time, either as a straight image, or from an image list.

All cool so far, except that this is not happening from the visual studio property browser, its happening from a property grid that is a part of a type editor.

My problem is, both the image picker (actually resource picker), and the imagelist type converter rely on some design-time services to get the job done. In the case of imagelist, its the IReferenceService and in the case of the resource picker its a service called _DTE.

In the first instance of an edit from the visual studio property browser, I could get a reference to these services but (1) how can I add them to the type descriptor context of my property grid?

It would be better, for future proofing, if I could just copy a reference to all of the services in the type descriptor context. (2) Where does the property browser get these services from in the first place?

ETA: I still don't know how to do it, but I now know it is possible.

(1) Sub-class control and add a property whose type is an array of buttons.

(2) Add it to a form.

(3) Select the new control on the design service and edit the new property in the property browser.

(4) The collection editor dialog pops-up

(5) Add a button

(6) Edit image and image list - the type editor and type converter, respectively, behave as they should.

ETA2: Ok, I'm getting warm. It looks like you do it through the Site property of the property grid. I can create a new site, and pass it the type descriptor context I have a reference to and then it should have all the service. I'll give it a go ...

View 1 Replies

Setting Property Of A Data Grid View Control?

Nov 15, 2010

I am using VB 2008...

On my form I have a "Combobox1" that pulls a list from an access table. I also have a "DataGridView1" that pulls data from another access table.

I am trying to set the "DataSource" property of the "DataGridView1" after clicking a button, which pulls the "Text" property from the "ComboBox1".

ComboBox1.Text will always equal DataGridView1.DataSource as a text string.

I researched the Get/Set command, but it does not make sense to my specific application. I have read countless articles online for weeks, but I have now taken the next step.

View 1 Replies

Showing Properties Of Child Objects In The Property Grid?

Mar 9, 2010

I have a custom class (Class1) with a bunch of properties. One of the properties of this class is another custom class (Class2) with its own properties.I have a property grid with the selected object set to Class 1. I can see Class 2 as a property, but i would like to expand Class 2 to show its properties in the same property grid.

Im basically trying to do the exact same thing as the Font Class on a form. If you look at the properties of a form in the designer, you can see the font property. You can then expand that to show the properties of the font class.

View 1 Replies

Equivalent In MaskedTextBox To Cliptext Property In VB6's Masked Edit Control?

Jun 16, 2010

I find this property useful but cannot find a direct replacement for it in vb.net. Is there one?

View 1 Replies

Windows - Enabling CTRL+Z Property In Masked Edit Textbox

Jul 22, 2010

I am using a masked edit text box in my windows application that was developed by using vb.net. In normal text boxes (CTRL+Z- to revert back to original value) is working fine. But In case of Masked Edit Textboxes its not working fine. This ctrl+Z should provide the functionality as same as normal textbox.

View 1 Replies

C# - Property Grid Control Not Allowing Custom Color Editing

Jul 6, 2010

When using the Property Grid and exposing a color property from an object you get this kind of interface for color selection: There are tabs for System and Web, those are fine, but the Custom tab (shown) which seems to be a subset of the standard windows color picker, seems to be hobbled. How do you create custom colors? How do you get custom colors into those white color boxes provided?

View 1 Replies

Show The Error Provider Properties To Property Grid At Runtime?

Feb 23, 2011

In designer i had a button with errorprovider.The button show 3 extra properties at button's property grid in design time.Error on ErrorProvider1

IconAlignmnent on

IconPadding on

But how can i show this 3 extra properties in propertygrid at run time?

Private Sub Form_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
Dim propertyGrid1 As New PropertyGrid()
propertyGrid1.CommandsVisibleIfAvailable = True[code].....

View 4 Replies

VS 2008 Can't Override ToString Of List(of T) For Purposes Of Property Grid?

Dec 13, 2011

Just say i have:

vb
Public Class Something
Inherits List(Of String)

[code].....

View 5 Replies

VS 2008 Properties In 'groups' (class) In Designer (property Grid)?

Jul 29, 2009

I'm creating a UserControl that draws a simple radial gauge. I need it to be very customizable; the user should be able to customize everything such as the colors, fonts, sizes. So, I just made a property for every customizable detail. For example, I had ScaleFont, ScaleColor, ScaleStart, ScaleEnd, ScaleInnerRadius, ScaleOuterRadius, ScaleTickmarkFrequenty, etc.. etc.. etc...

Because there are so many properties about the same subject, I wanted to 'group' these properties into one "property". I've seen this done loads of times in third party controls, but I've never done it before myself.The idea is that the properties can be accessed like

Me.Gauge1.ScaleSettings.Start = 10
Me.Gauge1.ScaleSettings.End = 80
...

So far, I tried creating a class for each group, for example a clsScaleSettings class, containing properties like Font, Color, Start, End, InnerRadius, OuterRadius, TickmarkFrequenty, etc (corresponding to the same properties as above).

Then, for every 'group' or class, I create a Property. For example, I have the ScaleSettings property, which simply returns an instance of the clsScaleSettings class (I initialize the instance only once of course):

vb.net
Private _ScaleSettings As New clsScaleSettings
Public Property ScaleSettings() As clsScaleSettings

[code]....

Now, this works in the code editor. I can now use

Gauge1.ScaleSettings.Font = Me.Font

for example, and it sets the font correctly.But, I does not work in the designer, in the Property Grid. The whole reason I made the effort to move and rename nearly all properties (about 70!), and all references to those properties, to separate classes, was so that the user could design the gauge more easily using the Property Grid!Instead of having 15 settings related to the scale, scattered all over the Property Grid, he can now have one ScaleSettings property, which he can expand, and then he can edit the properties of that group easily.The ScaleSettings property is greyed out in the property grid... So I cannot expand it and view it's underlying properties.

View 16 Replies

WinForms - Editing Custom Readonly Collection In Property Grid

Feb 19, 2010

I have a custom collection, lets says COL, that derives from ObjectModel.Collection. I have my own collection editor that works fine when a property, of type COL, is Read and Write enabled. However, if I change the property to ReadOnly, the open editor button stops showing in the property grid. As a test, I override my custom editor with the CollectionEditor, and that worked fine. So, my question is, what check is the property grid making, that CollectionEditor passes but my collection editor fails?

View 2 Replies

C# - Refresh Property Grid, At Design-time, When A Readonly Collection Changes In .Net, Winforms?

Mar 3, 2010

I have a class that has a readonly collection property - Its a list of extender providers that have been applied to the control.I've implemented a simple property descriptor for the collection so that the property can be expanded in the property grid to examine each entry.

When I select an extender provider and set it to false, I remove it from the collection. The GetProperties method of the type converter is requeried and the property grid refreshes.However, when I set an extender provider to true, and thus add it to the collection, GetProperties is not requeried.

Somehow, the property grid is making a distinction between adding to and removing from the collection. Or alternativly, its refreshing when an extender provider is added, but not when one is removed.

[Code]...

View 1 Replies

Property Of A Grid View Control That Can Set Text Size Of A Column Header?

Sep 21, 2011

Is there a property of a grid view control that can set the text size of a column header?

View 2 Replies

VS 2010 : Dropdown In Property Grid Listing Other Controls In The Form Or Container?

May 16, 2010

I have a custom control of type MyListControl with a Property called NotifiedList. I would like that when selecting that property in the Property Grid at runtime, that a dropdown list is populated with all the instances of type MyListControl that shared the same container as the original control.

View 3 Replies

C# - RefreshProperties Attribute At Class Level In .net, Winforms + Incorrectly Refreshing Property Grid?

Feb 15, 2010

I had a strange problem editing a class in the property grid whereby the property grid would refresh incorrectly.I managed to reduce the problem down to a class with just two properties. I've included the code at the end to ease explanation.It basically boils down to a class with two properties. The first of which is expandable (a font)The class itself is expandable and also implements the CreateInstance method in the type converter.To see the problem, expand the font, edit, say 'Bold', and tab away. Two problems happen:

(1) The second property jumps up and ends up in the expanded font property.

(2) The '-' sign of the expanded font changes to a '+'.

The problem goes away by attaching ResfreshProperties(RefreshProperties.All) to the class. That's great, but I'd like to understand how it fixed the problem. I've had a look in reflector and can't find any examples of RefreshProperties being attached at the class level.

[code]...

View 1 Replies

.net - If An Interface Defines A ReadOnly Property, How Can An Implementer Provide The Setter To This Property

Jun 10, 2011

Is there a way for implementers of an interface where a ReadOnly property is defined to make it a complete Read/Write Property ?

Imagine I define an interface to provide a ReadOnly Property (i.e., just a getter for a given value) :

Interface SomeInterface
'the interface only say that implementers must provide a value for reading
ReadOnly Property PublicProperty As String
End Interface

This means implementers must commit to providing a value. But I would like a given implementer to also allow setting that value. In my head, this would mean providing the Property's setter as part of the implementation, doing something like this :

Public Property PublicProperty As String Implements SomeInterface.PublicProperty
Get
Return _myProperty

[code]....

View 5 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved