Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Property Grid
  New Posts New Posts RSS Feed - PropertyGridItem
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

PropertyGridItem

 Post Reply Post Reply
Author
Message
zetanet View Drop Down
Newbie
Newbie
Avatar

Joined: 02 March 2006
Location: Italy
Status: Offline
Points: 3
Post Options Post Options   Thanks (0) Thanks(0)   Quote zetanet Quote  Post ReplyReply Direct Link To This Post Topic: PropertyGridItem
    Posted: 02 March 2006 at 7:29am

Hello.

Im' developping an application in VB.NET using PropertyGrid ActiveX (9.81).It is possible to customize the PropertyGridItem.Value property and manage the value with a sort of TypeConverter ?.

(The DirectoryItem sample is simple becouse the returned data is String   eg. "C:\" and all works fine.)

My idea is to assing a value that is a ArrayList (or another type of VB object).

Only a Dream?.

Thanks for the attention and sorry for my spaghetti english.(ITA)

Back to Top
SuperMario View Drop Down
Admin Group
Admin Group
Avatar

Joined: 14 February 2004
Status: Offline
Points: 18057
Post Options Post Options   Thanks (0) Thanks(0)   Quote SuperMario Quote  Post ReplyReply Direct Link To This Post Posted: 02 March 2006 at 8:03am
Value is an Object property so you should be able to store any type you want.

Maybe you can use the AfterEdit event or ValueChanged events to manually manuave the value when it is changed.

The AfterEdit event occurs after an edit operation, but before the value has been changed.  AfterEdit allows you to modify the new value before it is applied or you can completely cancel the operation.

Back to Top
zetanet View Drop Down
Newbie
Newbie
Avatar

Joined: 02 March 2006
Location: Italy
Status: Offline
Points: 3
Post Options Post Options   Thanks (0) Thanks(0)   Quote zetanet Quote  Post ReplyReply Direct Link To This Post Posted: 02 March 2006 at 9:18am

Private Sub wndPropertyGrid_InplaceButtonDown(ByVal sender As Object, ByVal e As AxXtremePropertyGrid._DPropertyGridEvents_InplaceButtonDownE vent) Handles wndPropertyGrid.InplaceButtonDown

UIDebug.Write("Inplace button down. Item.Caption = " + e.item.Caption)

Dim x As New UIConverterSpecifiche

If x.ShowDialog() = DialogResult.OK Then

e.item.Value = x.Value

Debug.Write(x.Value.GetType.ToString & " " & e.item.Value.GetType.ToString)

End If

End Sub

Sorry. SuperMario.

Code is very simple...

My Dialog return a System.ArrayList value type.

After assign the returned value at e arguments

e.item.Value = x.Value

the result is ... typeof variable x is System.ArrayList  while e.Item.Value type is System.String.

WHY?

n.b. System.String is the same type which i use for add the PropertyGridItem to the grid.

Dim ItemDirectory As PropertyGridItem = Category.AddChildItem(PropertyItemType.PropertyItemString, "TEST", value)

ItemDirectory.Flags = PropertyItemFlags.ItemHasExpandButton

 A possible BUG ? or how can i ovverride the problem?

Thanks Super.

 

 

Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.156 seconds.