You are here: > ESRI Forums > arcgis desktop discussion forums > Thread Replies

ArcGIS Desktop Discussion Forums

ArcGIS Desktop - ArcObjects Visual Basic for Application (VBA) forum

IComPropertySheet   Christoph Abart Sep 04, 2003
Re: IComPropertySheet   Olivier Damanet Sep 04, 2003
Re: IComPropertySheet   Olivier Damanet Sep 04, 2003
Re: IComPropertySheet   Christoph Abart Sep 04, 2003
Re: IComPropertySheet   Kristin Barker Sep 30, 2003
Re: IComPropertySheet   Olivier Damanet Oct 01, 2003
Re: IComPropertySheet   Kristin Barker Oct 03, 2003
Re: IComPropertySheet   Michael Straw Mar 20, 2004
Report Inappropriate Content • Top • Print • This Forum is closed for replies.    
Subject IComPropertySheet 
Author Christoph Abart 
Date Sep 04, 2003 
Message I'm trying to use the IComPropertySheet Interface to display the properties for a certain featurelayer. This works fine but now I want to show only some of these tabs of the property box. For example: I'd like to remove the "Source" tab.
Is there any way to remove one or more of these tabs or make a completly new property sheet and add only certain strips? - maybe with API Calls?

thank's in advance
Christoph 
   
Report Inappropriate Content • Top • Print • This Forum is closed for replies.    
Subject Re: IComPropertySheet 
Author Olivier Damanet 
Date Sep 04, 2003 
Message When populating a PropertySheet, you can pass the ID of a PropertyPage category, it will then display all property pages from the category that applies to the sinked object.
You could create your own PropertyPage category in the registry; for instance:
[HKEY_CLASSES_ROOT\Component Categories\{3B5AA17A-F67F-4A25-9B22-D1D23C0781A2}]
"409"="My Layer Property Pages"
use the GUID Tool from the ArcObjects utilities to generate a GUID for your Property Page category.

Then add this category to the \implemented categories of the Property Pages you want to display, e.g. to FeatureLayerSourceProperyPage:
[HKEY_CLASSES_ROOT\CLSID\{A1A37857-D673-11D2-9F42-00C04F6BC78E}\Implemented Categories\{3B5AA17A-F67F-4A25-9B22-D1D23C0781A2}]

Here is code to build a custom PropertySheet integrating all PropertyPages that implement that category: 
 
'Create a PropertySheet to display the My Layer Property Pages
  Dim pComPropSheet As IComPropertySheet
  Set pComPropSheet = New ComPropertySheet
  pComPropSheet.Title = "My Layer Properties"
    
  'Populate the Property Sheet
  Dim pPPUID As New UID
  pPPUID.Value = "{3B5AA17A-F67F-4A25-9B22-D1D23C0781A2}" 
  pComPropSheet.AddCategoryID pPPUID
  
  'Assign the Layer to the Property Sheet
  Dim pMySet As ISet
  Set pMySet = New esriCore.Set
  pMySet.Add pLayer
  pMySet.Reset
  
  pComPropSheet.EditProperties pMySet, m_pApp.hWnd
 
  Olivier. 
   
Report Inappropriate Content • Top • Print • This Forum is closed for replies.    
Subject Re: IComPropertySheet 
Author Olivier Damanet 
Date Sep 04, 2003 
Message Note: the "409" key name allows the category to be listed in the Component Category Manager. 
  Olivier. 
   
Report Inappropriate Content • Top • Print • This Forum is closed for replies.    
Subject Re: IComPropertySheet 
Author Christoph Abart 
Date Sep 04, 2003 
Message Thanks a lot! Works great!
Christoph 
   
Report Inappropriate Content • Top • Print • This Forum is closed for replies.    
Subject Re: IComPropertySheet 
Author Kristin Barker 
Date Sep 30, 2003 
Message Incredibly helpful, Oliver, as I have seen this written up nowhere else. Thanks very much.

Now, one follow-up question:

I can't seem to find a component category for the FeatureLayer symbology property page. esriCore.FeatureLayerSourcePropertyPage is there as is one for Display and Selection. Symbology and Display are the only pages I want in my properties dialog. There must be a more general symbology property page by another name.

I also need the symbology page for raster layers. I found RasterLayerSymbologyPropertyPage in the *registry* but not in the ComponentCategories editor. I haven't tried it, but am hoping it works.
 
  Kristin Barker
NatureServe
Arlington, VA
http://www.natureserve.org 
   
Report Inappropriate Content • Top • Print • This Forum is closed for replies.    
Subject Re: IComPropertySheet 
Author Olivier Damanet 
Date Oct 01, 2003 
Message Actually, the Symbology property pages are particular, because a distinct property page is embedded for each renderer (implementing IRendererPropertyPage and IComEmbeddedPropertyPage). These are listed in the 'ESRI Renderer Property Page' category.
However, my Component Categories manager lists 'RasterLayerSymbologyPropertyPage' in 'ESRI Layer Property Pages', and the Raster Renderers are listed in 'ESRI Raster Layer Property Pages'

I guess you can select only the renderers you want to display on your property sheet.

For more info about ArcGIS (Embedded) Property Pages, see draft chapters 2 and 5 of Extending AO: http://arcobjectsonline.esri.com/default.asp?URL=/TechnicalDocuments/ExtendingArcObjectsDrafts.htm 
  Olivier. 
   
Report Inappropriate Content • Top • Print • This Forum is closed for replies.    
Subject Re: IComPropertySheet 
Author Kristin Barker 
Date Oct 03, 2003 
Message Thanks for the lead. I'll look into the renderers and hopefully find what I need there. Thanks, too, for the pointer to the draft book online. Our project is working on some other functionality that will make use of this content.

-Kristin 
  Kristin Barker
NatureServe
Arlington, VA
http://www.natureserve.org 
   
Report Inappropriate Content • Top • Print • This Forum is closed for replies.    
Subject Re: IComPropertySheet 
Author Michael Straw 
Date Mar 20, 2004 
Message With some help from JD Zeiler, I think this is the code that does what you are looking for. The trick seems to be to set the UID to a new UID without an explicit value - so it has one, but not one that calls up any built in sheet. Then you can assign the specific property pages that you want on your sheet as shown in the modified sample.

regards,

mls 
 
Public Sub test()
'Create a PropertySheet to display the My Layer Property Pages
  Dim pDoc As IMxDocument
  Set pDoc = Application.Document
  
  Dim pLayer As ILayer
  Set pLayer = pDoc.FocusMap.Layer(0)
  
  Dim pComPropSheet As IComPropertySheet
  Set pComPropSheet = New ComPropertySheet
  pComPropSheet.Title = "My Layer Properties"
    
  'Populate the Property Sheet
  Dim pPPUID As New UID
  'pPPUID.Value = "{3B5AA17A-F67F-4A25-9B22-D1D23C0781A2}"
  Dim pDrawPage As IPropertyPage
  Set pDrawPage = New LayerDrawingPropertyPage
  
  pComPropSheet.AddCategoryID pPPUID
  pComPropSheet.AddPage pDrawPage
  
  Dim pSelPage As IPropertyPage
  Set pSelPage = New FeatureLayerDisplayPropertyPage
  pComPropSheet.AddPage pSelPage
  

  'Assign the Layer to the Property Sheet
  Dim pMySet As ISet
  Set pMySet = New esriCore.Set
  pMySet.Add pLayer
  pMySet.Reset
  
  pComPropSheet.EditProperties pMySet, 0
  
  pDoc.ActiveView.Refresh
  
End Sub