The SetGroupColor method assigns a color to a specific group. That color is visible only when the group is locked.
HRESULT SetGroupColor (
[in] long GroupID,
[in, defaultvalue(0x00ffffff)] long GroupColor)
Parameters:
GroupID – Refers to the group that has a particular color when locked. You can obtain the GroupID by one of the following methods:
As a returned value from the IInformationTree5::CreateGroup method call.
If you know the name of the group, find it using IInformationTree5::FindItem.
Traverse the Tree using IInformationTree5 methods such as GetNextItem, until you come to the desired GroupID.
GroupColor – The color that is assigned to the group.
Return Values:
The return value obtained from the returned HRESULT can be one of the following:
Return value |
Meaning |
S_OK |
Success. |
E_FAIL |
Catastrophic failure. |
TE_E_MPTNOTLOADED |
An MPT file must be loaded in TerraExplorer for this method to work. |
TE_E_INFOTREE_ITEMNOTGROUP |
The item entered is not a group and therefore cannot be renamed. |
TE_E_NOLICENSE |
You are running TerraExplorer Viewer and therefore do not have permissions to work with this interface. |
Remarks:
If the group contains a layer (i.e. rivers) this method can be used to set a color indication to that group.