method Appearance.Add (ID as Long, Skin as Variant)
Adds or replaces a skin object to the control.

TypeDescription
ID as Long A Long expression that indicates the index of the skin being added or replaced. The value must be between 1 and 126, so Appearance collection should holds no more than 126 elements.
Skin as Variant A string expression that indicates one of the following:
  • an Windows XP Theme part, it should start with "XP:". For instance the "XP:Header 1 2" indicates the part 1 of the Header class in the state 2, in the current Windows XP theme. In this case the format of the Skin parameter should be: "XP: Control/ClassName Part State" where the ClassName defines the window/control class name in the Windows XP Theme, the Part indicates a long expression that defines the part, and the State indicates the state like listed at the end of the document. This option is available only on Windows XP that supports Themes API.
  • copy of another skin with different coordinates, if it begins with "CP:" . For instance, you may need to display a specified skin on a smaller rectangle. In this case, the string starts with "CP:", and contains the following "CP:n l t r b", where the n is the identifier being copied, the l, t, r, and b indicate the left, top, right and bottom coordinates being used to adjust the rectangle where the skin is displayed. For instance, the "CP:1 4 0 -4 0", indicates that the skin is displayed on a smaller rectangle like follows. 
  • the path to the skin file ( *.ebn ). The Exontrol's exButton component installs a skin builder that should be used to create new skins
  • the BASE64 encoded string that holds a skin file ( *.ebn ). Use the Exontrol's exImages tool to build BASE 64 encoded strings on the skin file (*.ebn) you have created. Loading the skin from a file ( eventually uncompressed file ) is always faster then loading from a BASE64 encoded string

A byte[] or safe arrays of VT_I1 or VT_UI1 expression that indicates the content of the EBN file. You can use this option when using the EBN file directly in the resources of the project. For instance, the VB6 provides the LoadResData to get the safe array o bytes for specified resource, while in VB/NET or C# the internal class Resources provides definitions for all files being inserted. ( ResourceManager.GetObject("ebn", resourceCulture) ).

ReturnDescription
BooleanA Boolean expression that indicates whether the new skin was added or replaced.
Use the Add method to add or replace skins to the control. The skin method, in it's simplest form, uses a single graphic file (*.ebn) assigned to a part of the control. By using a collection of objects laid over the graphic, it is possible to define which sections of the graphic will be used as borders, corners and other possible elements, fixing them to their proper position regardless of the size of the part. Use the Remove method to remove a specific skin from the control. Use the Clear method to remove all skins in the control. Use the BeginUpdate and EndUpdate methods to maintain performance while init the control.

The skin method may change the visual appearance for the following parts in the control:

The identifier you choose for the skin is very important to be used in the background properties like explained bellow. Shortly, the color properties uses 4 bytes ( DWORD, double WORD, and so on ) to hold a RGB value. More than that, the first byte ( most significant byte in the color ) is used only to specify system color. if the first bit in the byte is 1, the rest of bits indicates the index of the system color being used. So, we use the last 7 bits in the high significant byte of the color to indicates the identifier of the skin being used. So, since the 7 bits can cover 127 values, excluding 0, we have 126 possibilities to store an identifier in that byte. This way, a DWORD expression indicates the background color stored in RRGGBB format and the index of the skin ( ID parameter ) in the last 7 bits in the high significant byte of the color. For instance, the BackColor = BackColor Or &H2000000 indicates that we apply the skin with the index 2 using the old color, to the object that BackColor is applied.

For instance, the following VB sample changes the visual appearance for the selected node. The SelColor property indicates the selection background color. Shortly, we need to add a skin to the Appearance object using the Add method, and we need to set the last 7 bits in the SelColor property to indicate the index of the skin that we want to use. The sample applies the "" to the selected node(s):

With ChartView1
    .VisualAppearance.Add 1, "D:\Temp\ExOrgChart.Help\select.ebn"
    .SelColor = &H1000000
End With

The following C++ sample changes the visual appearance for the selected node:

#include "Appearance.h"
m_chartview.GetVisualAppearance().Add( 1, COleVariant("D:\\Temp\\ExOrgChart.Help\\select.ebn") );
m_chartview.SetSelColor( 0x1000000 );

The following VB.NET sample changes the visual appearance for the selected node:

With AxChartView1
    .VisualAppearance.Add(1, "D:\Temp\ExOrgChart.Help\select.ebn")
    .Template = "SelColor = 16777216"
End With

The following C# sample changes the visual appearance for the selected node:

axChartView1.VisualAppearance.Add(1, "D:\\Temp\\ExOrgChart.Help\\select.ebn");
axChartView1.Template = "SelColor = 16777216";

The following VFP sample changes the visual appearance for the selected node:

With thisform.ChartView1
    .VisualAppearance.Add(1, "D:\Temp\ExOrgChart.Help\select.ebn")
    .SelColor = 16777216
EndWith

The screen shot was generated using the following template:

BeginUpdate 
VisualAppearance
{
	Add( 1, "gBFLBCJwBAEHhEJAEGg4BU4Fg6AABACAxWgKBADQKAAyDIKsEQGGIZRhhGIwAgaFIXQKMU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VGYEAhj8G4WAgQYzjYFhYgKDRSDyeIBAWGwGCAL44gaKBogKC47FwaJjAkN5SECIoIgECRkC2AIIgYEAADWYoynicANDIYBYgIDYuiqYwviCBBIFgMAECSWg7kuAIRlYWAhASEAUESS4plUKozm6S4wEMFJzEwMgPAoIIjGcIJLmEA4JAoKATCGGYkCoaIijQGxLmkCAfmYIBhAKBgqDOIACgeCgDmAAUIQJBwiRAgA8cIEBPAPB+FgQg0QKBjGIMEAwUQiCMFgGQLwe08jdAICEXA8BhihDKMwIIlAmBAFAPccwPwACgCAEcDYkQqh4BSFQGYJB/hxCsEIDoxAMAfAay8XAkBNgDCiDEAgAwEBBDAMcDYARzBQGmIoHAIQwDfAKFQfg4BgiSAMDgCwIAIgiHYJUS4DwBD5EgMRQh8xihjDCLwCg0wyBaGMPYQYBQBh0ECMQJ4TwAjQGIBwNoPBgiGAyHAcAuBKADF0OIGogwFAfHIDcIYtwYjQHCMYCYYVECHAiFUTAmAgi+DyIUcAwwICKGaMAIYHQ3BkDiMQDYWRAABEMBcHQcAwBBAuDcBg8ASgFCSGgCwhQOhtF47MDAawaABGmIAPYMRQCuV0KQEAcg2AHDoKEYwsAxAwACAYZQVxyBoDaEECYdA4iBFMHkBIsACgcCMLIGIBxYhcDyMUeAPwVC4HwNABgrwVBkAAG0I4sBwiGAmFES4exJKqAgMAQABxeDiFoIMCQVQ+DxAKBAKQIxdiQAKLEPwkBhAMksJUVI3A1gJAaDAYYBwsifBUPgcAhALhuCgEAAAOyAg=" AddAssistant("Assistant node") } Nodes { Add("Item 1",,"Key1") { HasButton = False LinkTo = "Key2" } Add("SubItem 1","Key1") Add("SubItem 2","Key1") Add("Item 2",,"Key2") { Expanded = False ArrangeSiblingNodesAs = 1 Picture = "gBHJJGHA5MIwAEIe4AAAFhwbiAliQwig7ixFjBQjRbjhljxwkB7kSFkiQkyblCllSwli7lzFmDQmTbmjlmzwnD7nQBnk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTqlVq1XrFZrVbrldr1YhgAEL5AgBhj/AAssMJthABFof4JDhIWCgYKDBATFT8M6hUIFAQAEQCCDwYF/QoWDZCRBgOKgIYHCQXMisKBAEQAAgOBZaSgQhjERANKQiZhIWamYyIBQ6FzcNKxQLJT4ADA4RjwObAAidBYdHwABQgUxMQYZEI0cD4OgnYKaKyzIRFNQx2YCKoFHScYD0ADXQwUAgwLoLQDqaCWBJoNQ9NBxFJTVQORgiarqSABbamGwtDAwBUWhQmqYALnOFQvGYPA4m6AwKhkZxKj2PBWC0SZCgmVY6CwIJgieBAniubRKHgaYgiwQwGiCfxGDWbBRmGZYIi2VwGnAexxGUSwUFiaR+hQPbBgOCoLCIHh4DAARCmQG4AlgNxuhwWgpFAEQUhuOxOk0NrhAaQoBmgPYdFSIZPjYGYbn+HhgEoAA7HMBIOjUM51AoPojHkEwVlET5slgWZtAEUBdjeSoeF6X5/rQRRSi+QB6GychsEAfZshKYABGQZorlAOgMBqEgAjYHB2jqSoigmYBLk+QZnBqGhggAEwImgbojgoIwSE+MxUHiS4REQCQWluD48B+JJoL+YQikuaI9AALgLmsJQfnSdAvDkCJEhIIIBgOegLEiPBqCyCAAjcCwgAAIJBhQBQkHGL4gDaNBokkZQMiwUAuioJQiCAQYsHMcwwEIeoigAYIogsGIwFKIYICIWguEoPgQhsawBASGgwCuJwLH8K4LigAIaDwbxMAOKxbisPwfASQATFASoagIEYwgcSoKGiAA/mEdIuiGPxCmObIlhMIJNHONxFH8EpPCGeB+noEpBBSSRjCsPZEiyKhgjAH5whSdLEjwDxjC8TxVEMFRzFWJJZBUSI0gQEQLBOM4VHkIg1D0CAJDQNg/p4AAdoC" } Add("SubItem 1","Key2") Add("SubItem 2","Key2") } EndUpdate