Type | Description | |||
Handle as Variant |
The Handle parameter can be:
|
The user can add images at design time, by drag and drop files to combo's image holder. The ImageSize property defines the size (width/height) of the icons within the control's Images collection. Use the ReplaceIcon method to add, remove or clear icons in the control's images collection. Use the Image property to assign an icon to a node. Use the Picture property to load a picture to a node.
The following VB sample uses the Microsoft Image List control:
ChartView1.Images ImageList1.hImageList
The following VB sample loads icons and pictures using the BASE64 encoded strings:
Dim s As String With ChartView1 .BackColor = vbWhite .Images ("gBJJgBggAAwAAgACEKAD/hz/EMNh8TIRNGwAjEZAEXjAojJAjIgjIBAEijUlk8plUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTqlVq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/wGBwWDh+Dw1bwuJh0Sf8txeHyFXx+Ryk9wsnxbAzUpycYxWNiWMyujleXjOm0+gjKA1gA1iA0Wf0mz2WY1WwjWywuvz2N1GzyO11ON3mXxe6xfFzvAwXI1UY3mh5292PJ1vMw3T7Hbo3T73L7nhl3f5/i8034Xn9Xr9nt91Cio+lXyjsfkMjAEkk/69Hg97UpSeZ3pSeBnpScAHwO/iMmBBaMQalJAQc10JvylUJkAD8Dh+lJ8Q4k5/D+zjygAgI") With .Root .Image = 1 End With With .Nodes.Add("Item 1") s = "gBCJr+BAAg0HGwEgwog4jg4ig4BAEFg4AZEKisZjUbAAzg5mg6Zg7Mg7/g0ek8oGcgjsijskjsmAEsmcoM0sM0uM0wM0ylwATMoTMsTMuTMwTMymAAZkoZksZkuZkwZkymQAf8of8sf8uf8wf8mlEdskekEekUekkesUqGcet9nGdpGdrGdilkruE3js5vtrnstk9BltnosttdJl8npsvs9Rl9rqsxk9ZmNnrsxtdhmcfskg0FAzskkEmM02t810Fzmuku8znGn2Ggv030mBv0zwk50GHnOkxU7g07s1PmeQnekyeBmeWnugzM90mcn9p0UgkXZpmik2EoGpoPY1lBklB7tE2VD7F+oflwOHoGEovYw9F8uKo8Go9o41H7KpqAybFKAyykuwzKkvKzilrW7aQPK7aSJIkzGqY1Kmwe1imwk17jKY2SnwevynwkwLIKYwiowew6owkxUAKYxqpweyCpwkybJqYyyqwezKqwkzirrErDOu7IkJyIyysNSrLStYrMJteraDK2ti+K2kStwmwLMqwwiutKw6uwmxSvyoxqvtKyCvwmybOKwyywtKzKwwnN6OTxPM9T3Pk+z9P9AUDP5V0JQtDUPRFE0SAFFUbR1FAAa9JUnSlJlnSZo0xStJGtStI03UFJUvUdQmuVtKU/TdT1RSpoGvS5WVKa9U1lWdRVrTtWVBS9c1nWlI0vSlY09WVg18a9MgAEla0nWliUkABHjXYCDUzSVY2daFSoNaBHWnWZH1/blN1TY1" s = s + "XgBadlDXdYSXRb9wWBclK2taF1gAI5HiPaN8oPdlNWbaF23KAwyWkNYyXxg9p3WNYjU/c1bWgABZoMiQS4YR984YNdpEeMgA2bgVtVHil0DVdY1CPhON44IGOI1XVPCPjl14RlmZ3XmZH3aWdYW1VF3DWMuWXXlw15PhlI3pgGJEfpGiZZgw1kTe1s0+g2Dalhmh6Pjgg5zrVx5/iV74bjGN41k9pCNl6D1dilKWDrGZ6ftmcZyNYAhKAGl7HemgoNs415XjI1XLmNm3sEho2jwdw4zmd+2+aFjFZVJWYpndf3xSPG2/koSWXW+I7JURZmtzO+XPe1K9RZ+S9HS1PllWfB9FiHEWZVBZWzeXdU32Fa973/SW34lr0nV1meH4/heb5/mWL4no+fUAAICA" .Picture = s End With With .Nodes.Add("Item 2", , "ketA") s = "gBCJoqBAAg0HGwEgwog4qg4Xg4BAEFg4AegDisZjUbgwzg5mg6Zg7Mg7/jsHGceAAzkErkUrkkrkwAls0lRmlpml5mmJmmcvACZlSZlqZl6ZmKZmcxADMlTMlrMl7MmLMmczAD/lT/lr/l7/mL/k0qldlj0gj0ij0kj1jlUpj0ptAztQztgzsctllxnErnV+tk+l0doUutFGl1spUwjtOmFoqUwtlWmUdrUytFemVssU0j9lkGhoOekkg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BEEBzr/ADgGAcIhbgKwYiBU2p9QoiBWizgCAFs7RYUOUEeAcMjywAgOAC0FyhK3DuHBWsxrxBlRKKfaAZtr9QDt3buxNiQaw1AHBYKwFgOXTgyEQIkWawwABWVArVUUV2gBrByACJjjF7glFYACDijIzAOAAolUqpFXM9UwooVgJQurdhsthmAKxTDXIcA4K0V5BqLFa39dDI1FDQUaDJr" s = s + "K7lDLYABKAaArVsisUuoWK6m1UKyYIpSVihRrPSlILKQi51OK6USqJUDIlSzBU4LNSKjVDytllIVSIiJiSKgKQE=" .Picture = s End With With .Nodes.Add("Child", "ketA") End With End With
Run the sample and you get:
The following C++ sample loads a collection of icons from a BASE64 encoded string:
m_chartview.Images(COleVariant("gBJJgBggAAwAAgACEKAD/hz/EMNh8TIRNGwAjEZAEXjAojJAjIgjIBAEijUlk8plUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTqlVq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/wGBwWDh+Dw1bwuJh0Sf8txeHyFXx+Ryk9wsnxbAzUpycYxWNiWMyujleXjOm0+gjKA1gA1iA0Wf0mz2WY1WwjWywuvz2N1GzyO11ON3mXxe6xfFzvAwXI1UY3mh5292PJ1vMw3T7Hbo3T73L7nhl3f5/i8034Xn9Xr9nt91Cio+lXyjsfkMjAEkk/69Hg97UpSeZ3pSeBnpScAHwO/iMmBBaMQalJAQc10JvylUJkAD8Dh+lJ8Q4k5/D+zjygAgI") ); m_chartview.GetRoot().SetImage( 1 );
The following C++ sample loads the system's image list ( used by Windows Explorer ):
SHFILEINFO sfi; ZeroMemory( &sfi, sizeof(sfi) ); m_chartView.Images( COleVariant( (long)SHGetFileInfo(_T("C:\\"), 0, &sfi, sizeof (SHFILEINFO), SHGFI_SMALLICON | SHGFI_SYSICONINDEX ) ) );
If you are using the CImageList class, you should use the HIMAGELIST operator of the CImageList class, to pass to the Images method like described:
m_chartView.Images( COleVariant( long( pImageList->operator HIMAGELIST() ) ) );
The following VB.NET sample loads a collection of icons from a BASE64 encoded string:
With AxChartView1 .Images("gBJJgBggAAkGAAQhIAf8Nf4hhkOiRCJo2AEXjAAi0XFEYIEYhUXAIAEEZi8hk0plUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDoMOolHpFJpVLpNGp0NiL/ltQplVq1XrFZqlZrldr1co0mqDAskprcXp9SiNRr9tt1vmVhjFyudqjCAvAAvCAtlpuF/wFuv1iu18jN+o17tFSumBx2PpWDutSxVhqGIqGVs+QzmdneYu0XxVr0GLvuZvOe1Wrmul1mv2GP0uzzex223n+00O43m9oeS33B4XD4nF43H5FKig+lXMjkekEYkcjjOGnFPlLzd8peDPlLgB/f6kZYHjjHllKA82i9cilXtQAf74/lL4+kmfx/s27AEBA==") .Root.Image = 1 End With
The following C# sample loads a collection of icons from a BASE64 encoded string:
axChartView1.Images("gBJJgBggAAkGAAQhIAf8Nf4hhkOiRCJo2AEXjAAi0XFEYIEYhUXAIAEEZi8hk0plUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDoMOolHpFJpVLpNGp0NiL/ltQplVq1XrFZqlZrldr1co0mqDAskprcXp9SiNRr9tt1vmVhjFyudqjCAvAAvCAtlpuF/wFuv1iu18jN+o17tFSumBx2PpWDutSxVhqGIqGVs+QzmdneYu0XxVr0GLvuZvOe1Wrmul1mv2GP0uzzex223n+00O43m9oeS33B4XD4nF43H5FKig+lXMjkekEYkcjjOGnFPlLzd8peDPlLgB/f6kZYHjjHllKA82i9cilXtQAf74/lL4+kmfx/s27AEBA=="); axChartView1.Root.Image = 1;
The following VFP sample loads a collection of icons from a BASE64 encoded string:
With thisform.ChartView1 local s s = "gBJJgBggAAkGAAQhIAf8Nf4hhkOiRCJo2AEXjAAi0XFEYIEYhUXAIAEEZi8hk0plUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDoMOolHpFJpVLpNGp0NiL/ltQplVq1XrFZqlZrldr1co0mqDAskprcXp9SiNRr9tt1vmVhjFyudqjCAvAAvCAtlpuF/wFuv1iu1" s = s + "8jN+o17tFSumBx2PpWDutSxVhqGIqGVs+QzmdneYu0XxVr0GLvuZvOe1Wrmul1mv2GP0uzzex223n+00O43m9oeS33B4XD4nF43H5FKig+lXMjkekEYkcjjOGnFPlLzd8peDPlLgB/f6kZYHjjHllKA82i9cilXtQAf74/lL4+kmfx/s27AEBA==" .Images(s) .Root.Image = 1 EndWith