Print Page | Close Window

Folder browse button in Grid?

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Property Grid
Forum Description: Topics Related to Codejock Property Grid
URL: http://forum.codejock.com/forum_posts.asp?TID=3554
Printed Date: 27 November 2024 at 5:14am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Folder browse button in Grid?
Posted By: Shawshank
Subject: Folder browse button in Grid?
Date Posted: 24 January 2006 at 7:16pm

Is it possible to have a folder browse button as a PropertyItemType? Much like the browse works for fonts or colors in the Grid --except I want a folder browse. Is this possible?




Replies:
Posted By: Oleg
Date Posted: 25 January 2006 at 9:33am

Just code from sample: (Actually why nobody check them???)

...

    Set ItemDirectory = Category.AddChildItem(PropertyItemString, "Directory", "C:\")
    ItemDirectory.Flags = ItemHasEdit + ItemHasExpandButton
    ItemDirectory.Id = ITEM_DIRECTORY
 

...

Private Sub wndPropertyGrid_InplaceButtonDown(ByVal Item As XtremePropertyGrid.IPropertyGridItem)
   
    Debug.Print "Inplace button down. Item.Caption = "; Item.Caption
   
    If Item.Id = ITEM_DIRECTORY Then
        Dim Shell As Object
        Dim FolderItems As Object
        Dim FolderItem As Object
       
        Set Shell = CreateObject("Shell.Application")
        Set FolderItems = Shell.BrowseForFolder(Form1.hWnd, "Directories", 0, "c:\")
        If Not (FolderItems Is Nothing) Then
             Set FolderItem = FolderItems.Items.Item
             Item = FolderItem.Path
        End If
        Set Shell = Nothing
    End If
End Sub
 



-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net