Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Property Grid
  New Posts New Posts RSS Feed - Events fired when item is ReadOnly
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Events fired when item is ReadOnly

 Post Reply Post Reply
Author
Message
Albert1 View Drop Down
Groupie
Groupie
Avatar

Joined: 01 February 2007
Location: Italy
Status: Offline
Points: 66
Post Options Post Options   Thanks (0) Thanks(0)   Quote Albert1 Quote  Post ReplyReply Direct Link To This Post Topic: Events fired when item is ReadOnly
    Posted: 08 June 2007 at 7:39am

When an Item is ReadOnly, it should not fire events. In this code:


Private Sub Form_Load()
    With PropertyGrid1
        .AddCategory "category"
        .Categories(1).AddChildItem PropertyItemString, "Item"
        .Categories(1).Childs(1).ReadOnly = True
    End With
End Sub
Private Sub PropertyGrid1_AfterEdit(ByVal Item As XtremePropertyGrid.IPropertyGridItem, NewValue As String, Cancel As Boolean)
    MsgBox ("Why Am I here?")
End Sub


When you click on the data section of the Item and then you leave the field, the event AfterEdit is fired. If I have a centralized management inside this function I have to spend extra time in checking whether the Item is ReadOnly or not.
IMHO, ReadOnly=True should automatically set ItemHasEdit to False.


    PropertyGrid1.Categories(1).Childs(1).Flags = Not ItemHasEdit


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.188 seconds.