484. How can I apply the same ConditionalFormat on more than 1(one) column (multiple columns and not on item)
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->BeginUpdate(); EXTREELib::IConditionalFormatPtr var_ConditionalFormat = spTree1->GetConditionalFormats()->Add(L"1","K1"); var_ConditionalFormat->PutBackColor(RGB(255,0,0)); var_ConditionalFormat->PutApplyTo(EXTREELib::FormatApplyToEnum(0x1)); EXTREELib::IConditionalFormatPtr var_ConditionalFormat1 = spTree1->GetConditionalFormats()->Add(L"1","K2"); var_ConditionalFormat1->PutBackColor(RGB(255,0,0)); var_ConditionalFormat1->PutApplyTo(EXTREELib::FormatApplyToEnum(0x2)); spTree1->PutMarkSearchColumn(VARIANT_FALSE); spTree1->PutDrawGridLines(EXTREELib::exRowLines); EXTREELib::IColumnsPtr var_Columns = spTree1->GetColumns(); var_Columns->Add(L"Column 1"); var_Columns->Add(L"Column 2"); var_Columns->Add(L"Column 3"); EXTREELib::IItemsPtr var_Items = spTree1->GetItems(); var_Items->AddItem(vtMissing); var_Items->AddItem(vtMissing); var_Items->AddItem(vtMissing); spTree1->EndUpdate();
483. Is it possible to display empty strings for 0 values
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); ((EXTREELib::IColumnPtr)(spTree1->GetColumns()->Add(L"Currency")))->PutFormatColumn(L"dbl(value) ? currency(dbl(value)) : ``"); EXTREELib::IItemsPtr var_Items = spTree1->GetItems(); var_Items->AddItem(double(1.23)); var_Items->AddItem(double(2.34)); var_Items->AddItem(long(0)); var_Items->AddItem(double(10000.99));
482. Is it possible to display empty strings for 0 values
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->GetColumns()->Add(L"Number"); ((EXTREELib::IColumnPtr)(spTree1->GetColumns()->Add(L"Currency")))->PutComputedField(L"%0 ? currency(%0) : ``"); EXTREELib::IItemsPtr var_Items = spTree1->GetItems(); var_Items->AddItem(double(1.23)); var_Items->AddItem(double(2.34)); var_Items->AddItem(long(0)); var_Items->AddItem(double(10000.99));
481. How can I get the list of items as they are displayed
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->BeginUpdate(); spTree1->PutBackColorAlternate(RGB(240,240,240)); spTree1->GetColumns()->Add(L"Names"); EXTREELib::IItemsPtr var_Items = spTree1->GetItems(); var_Items->AddItem("Mantel"); var_Items->AddItem("Mechanik"); var_Items->AddItem("Motor"); var_Items->AddItem("Murks"); var_Items->AddItem("Märchen"); var_Items->AddItem("Möhren"); var_Items->AddItem("Mühle"); spTree1->GetColumns()->GetItem(long(0))->PutSortOrder(EXTREELib::SortAscending); spTree1->EndUpdate(); OutputDebugStringW( _bstr_t(spTree1->GetItems(long(1))) );
480. Is posible to reduce the size of the picture to be shown in the column's caption
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->BeginUpdate(); spTree1->PutHTMLPicture(L"pic1","c:\\exontrol\\images\\zipdisk.gif"); spTree1->PutHeaderHeight(48); ((EXTREELib::IColumnPtr)(spTree1->GetColumns()->Add(L"DefaultSize")))->PutHTMLCaption(L"Default-Size <img>pic1</img> Picture"); ((EXTREELib::IColumnPtr)(spTree1->GetColumns()->Add(L"CustomSize")))->PutHTMLCaption(L"Custom-Size <img>pic1:16</img> Picture"); spTree1->EndUpdate();
479. How can I change the color, font, bold etc for the items/cells in the same column or for the entire column
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->BeginUpdate(); spTree1->PutMarkSearchColumn(VARIANT_FALSE); EXTREELib::IConditionalFormatPtr var_ConditionalFormat = spTree1->GetConditionalFormats()->Add(L"1",vtMissing); var_ConditionalFormat->PutBold(VARIANT_TRUE); var_ConditionalFormat->PutForeColor(RGB(255,0,0)); var_ConditionalFormat->PutApplyTo(EXTREELib::FormatApplyToEnum(0x1)); spTree1->GetColumns()->Add(L"C1"); EXTREELib::IColumnPtr var_Column = ((EXTREELib::IColumnPtr)(spTree1->GetColumns()->Add(L"C2"))); var_Column->PutHeaderBold(VARIANT_TRUE); var_Column->PutHTMLCaption(L"<fgcolor=FF0000>C2"); EXTREELib::IItemsPtr var_Items = spTree1->GetItems(); var_Items->PutCellCaption(var_Items->AddItem(long(10)),long(1),long(11)); var_Items->PutCellCaption(var_Items->AddItem(long(12)),long(1),long(13)); spTree1->EndUpdate();
478. The item is not getting selected when clicking the cell's checkbox. What should I do
// CellStateChanged event - Fired after cell's state has been changed. void OnCellStateChangedTree1(long Item,long ColIndex) { /* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->GetItems()->PutSelectItem(Item,VARIANT_TRUE); } EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); ((EXTREELib::IColumnPtr)(spTree1->GetColumns()->Add(L"Check")))->PutDef(EXTREELib::exCellHasCheckBox,VARIANT_TRUE); EXTREELib::IItemsPtr var_Items = spTree1->GetItems(); var_Items->AddItem(long(0)); var_Items->AddItem(long(1)); var_Items->AddItem(long(2)); var_Items->AddItem(long(3));
477. Is it possible to limit the height of the item while resizing
// AddItem event - Occurs after a new Item has been inserted to Items collection. void OnAddItemTree1(long Item) { /* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->GetItems()->PutItemMinHeight(Item,18); spTree1->GetItems()->PutItemMaxHeight(Item,72); } EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->BeginUpdate(); spTree1->PutItemsAllowSizing(EXTREELib::exResizeItem); spTree1->PutScrollBySingleLine(VARIANT_FALSE); spTree1->PutBackColorAlternate(RGB(240,240,240)); spTree1->GetColumns()->Add(L"Names"); EXTREELib::IItemsPtr var_Items = spTree1->GetItems(); var_Items->AddItem("Mantel"); var_Items->AddItem("Mechanik"); var_Items->AddItem("Motor"); var_Items->AddItem("Murks"); var_Items->AddItem("Märchen"); var_Items->AddItem("Möhren"); var_Items->AddItem("Mühle"); spTree1->GetColumns()->GetItem(long(0))->PutSortOrder(EXTREELib::SortAscending); spTree1->EndUpdate();
476. Is it possible to copy the hierarchy of the control using the GetItems method
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->PutLinesAtRoot(EXTREELib::exLinesAtRoot); spTree1->GetColumns()->Add(L"Def"); EXTREELib::IItemsPtr var_Items = spTree1->GetItems(); long h = var_Items->AddItem("Root"); var_Items->InsertItem(h,long(0),"Child 1"); var_Items->InsertItem(h,long(0),"Child 2"); spTree1->PutItems(spTree1->GetItems(long(-1)),vtMissing);
475. How can I show the child items with no identation
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->PutLinesAtRoot(EXTREELib::exGroupLinesOutside); spTree1->PutIndent(12); spTree1->PutHasLines(EXTREELib::exThinLine); spTree1->GetColumns()->Add(L"Default"); EXTREELib::IItemsPtr var_Items = spTree1->GetItems(); long h = var_Items->AddItem("Root 1"); var_Items->InsertItem(h,long(0),"Child 1"); var_Items->InsertItem(h,long(0),"Child 2"); var_Items->InsertItem(h,long(0),"Child 3"); var_Items->PutExpandItem(h,VARIANT_TRUE); h = var_Items->AddItem("Root 2"); var_Items->InsertItem(h,long(0),"Child 1"); var_Items->InsertItem(h,long(0),"Child 2"); var_Items->InsertItem(h,long(0),"Child 3");
474. Is there other ways of showing the hierarchy lines (exGroupLinesAtRoot)
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->PutLinesAtRoot(EXTREELib::exGroupLinesAtRoot); spTree1->PutIndent(12); spTree1->GetColumns()->Add(L"Default"); EXTREELib::IItemsPtr var_Items = spTree1->GetItems(); long h = var_Items->AddItem("Root"); var_Items->InsertItem(h,long(0),"Child 1"); var_Items->InsertItem(h,long(0),"Child 2"); var_Items->InsertItem(h,long(0),"Child 3"); var_Items->PutExpandItem(h,VARIANT_TRUE);
473. Is there other ways of showing the hierarchy lines (exGroupLinesOutside)
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->PutLinesAtRoot(EXTREELib::exGroupLinesOutside); spTree1->PutIndent(12); spTree1->GetColumns()->Add(L"Default"); EXTREELib::IItemsPtr var_Items = spTree1->GetItems(); long h = var_Items->AddItem("Root 1"); var_Items->InsertItem(h,long(0),"Child 1"); var_Items->InsertItem(h,long(0),"Child 2"); var_Items->InsertItem(h,long(0),"Child 3"); var_Items->PutExpandItem(h,VARIANT_TRUE); h = var_Items->AddItem("Root 2"); var_Items->InsertItem(h,long(0),"Child 1"); var_Items->InsertItem(h,long(0),"Child 2"); var_Items->InsertItem(h,long(0),"Child 3");
472. Is there other ways of showing the hierarchy lines (exGroupLinesInsideLeaf)
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->PutLinesAtRoot(EXTREELib::exGroupLinesInsideLeaf); spTree1->PutIndent(12); spTree1->GetColumns()->Add(L"Default"); EXTREELib::IItemsPtr var_Items = spTree1->GetItems(); long h = var_Items->AddItem("Root"); var_Items->InsertItem(h,long(0),"Child 1"); var_Items->InsertItem(h,long(0),"Child 2"); var_Items->InsertItem(h,long(0),"Child 3"); var_Items->PutExpandItem(h,VARIANT_TRUE);
471. Is there other ways of showing the hierarchy lines (exGroupLinesInside)
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->PutLinesAtRoot(EXTREELib::exGroupLinesInside); spTree1->PutIndent(12); spTree1->GetColumns()->Add(L"Default"); EXTREELib::IItemsPtr var_Items = spTree1->GetItems(); long h = var_Items->AddItem("Root"); var_Items->InsertItem(h,long(0),"Child 1"); var_Items->InsertItem(h,long(0),"Child 2"); var_Items->InsertItem(h,long(0),"Child 3"); var_Items->PutExpandItem(h,VARIANT_TRUE);
470. Is there other ways of showing the hierarchy lines (exGroupLines)
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->PutLinesAtRoot(EXTREELib::exGroupLines); spTree1->PutIndent(12); spTree1->GetColumns()->Add(L"Default"); EXTREELib::IItemsPtr var_Items = spTree1->GetItems(); long h = var_Items->AddItem("Root"); var_Items->InsertItem(h,long(0),"Child 1"); var_Items->InsertItem(var_Items->InsertItem(h,long(0),"Child 2"),long(0),"SubChild 2"); var_Items->InsertItem(h,long(0),"Child 3"); var_Items->PutExpandItem(h,VARIANT_TRUE);
469. Does your control supports multiple lines tooltip
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->PutHTMLPicture(L"pic1","c:\\exontrol\\images\\zipdisk.gif"); spTree1->PutToolTipDelay(1); ((EXTREELib::IColumnPtr)(spTree1->GetColumns()->Add(L"tootip")))->PutToolTip(_bstr_t("<br><font Tahoma;10>This</font> is a <b>multi-lines</b> tooltip assigned to a column. The toolt") + "ip supports built-in HTML tags, icons and pictures.<br><br><br><img>pic1</img> picture ... <br><" + "br>");
468. How can I prevent highlighting the column from the cursor - point
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->GetVisualAppearance()->Add(1,_bstr_t("gBFLBCJwBAEHhEJAEGg4BI0IQAAYAQGKIYBkAKBQAGaAoDDUOQzQwAAxDKKUEwsACEIrjKCYVgOHYYRrIMYgBCMJhLEoaZL") + "hEZRQiqDYtRDFQBSDDcPw/EaRZohGaYJgEgI="); spTree1->PutBackground(EXTREELib::exCursorHoverColumn,0x1000000); ((EXTREELib::IColumnPtr)(spTree1->GetColumns()->Add(L"S")))->PutWidth(32); ((EXTREELib::IColumnPtr)(spTree1->GetColumns()->Add(L"Level 1")))->PutLevelKey(long(1)); ((EXTREELib::IColumnPtr)(spTree1->GetColumns()->Add(L"Level 2")))->PutLevelKey(long(1)); ((EXTREELib::IColumnPtr)(spTree1->GetColumns()->Add(L"Level 3")))->PutLevelKey(long(1)); ((EXTREELib::IColumnPtr)(spTree1->GetColumns()->Add(L"E1")))->PutWidth(32); ((EXTREELib::IColumnPtr)(spTree1->GetColumns()->Add(L"E2")))->PutWidth(32); ((EXTREELib::IColumnPtr)(spTree1->GetColumns()->Add(L"E3")))->PutWidth(32); ((EXTREELib::IColumnPtr)(spTree1->GetColumns()->Add(L"E4")))->PutWidth(32);
467. Is there any option to show the tooltip programmatically
// MouseMove event - Occurs when the user moves the mouse.
void OnMouseMoveTree1(short Button,short Shift,long X,long Y)
{
/*
Copy and paste the following directives to your header file as
it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library'
#import <ExTree.dll>
using namespace EXTREELib;
*/
EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown();
spTree1->ShowToolTip(_bstr_t(spTree1->GetItemFromPoint(-1,-1,c,hit)),"","8","8",vtMissing);
}
EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown();
spTree1->BeginUpdate();
spTree1->GetColumns()->Add(L"Def");
EXTREELib::IItemsPtr var_Items = spTree1->GetItems();
var_Items->AddItem("Item 1");
var_Items->AddItem("Item 2");
var_Items->AddItem("Item 3");
spTree1->EndUpdate();
466. Is it possible to prevent changing the rows/items colors by selection
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->PutSelBackMode(EXTREELib::exTransparent); ((EXTREELib::IColumnPtr)(spTree1->GetColumns()->Add(L"HTML")))->PutDef(EXTREELib::exCellCaptionFormat,long(1)); EXTREELib::IItemsPtr var_Items = spTree1->GetItems(); var_Items->AddItem(_bstr_t("<font ;12>T</font>his <b>is</b> an <a>html</a> <font Tahoma><fgcolor=FF0000>text</fgcolor></fon") + "t>."); var_Items->PutSelectItem(var_Items->AddItem(_bstr_t("<font ;6>This</font> <b>is</b> another <a>html</a> <font Tahoma><fgcolor=FF0000>text</fgcolor><") + "/font>."),VARIANT_TRUE);
465. Is it possible to specify the cell's value but still want to display some formatted text instead the value
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->BeginUpdate(); spTree1->PutMarkSearchColumn(VARIANT_FALSE); spTree1->GetColumns()->Add(L"Value"); spTree1->GetColumns()->Add(L"FormatCell"); EXTREELib::IItemsPtr var_Items = spTree1->GetItems(); long h = var_Items->AddItem(long(1)); var_Items->PutCellCaption(h,long(1),long(12)); var_Items->PutFormatCell(h,long(1),L"currency(value)"); h = var_Items->AddItem("1/1/2001"); var_Items->PutCellCaption(h,long(1),"1/1/2001"); var_Items->PutCellCaptionFormat(h,long(1),EXTREELib::exHTML); var_Items->PutFormatCell(h,long(1),L"longdate(value) replace '2001' with '<b>2001</b>'"); spTree1->EndUpdate();
464. How can I simulate displaying groups
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->BeginUpdate(); spTree1->PutHasLines(EXTREELib::exNoLine); spTree1->PutScrollBySingleLine(VARIANT_TRUE); spTree1->PutMarkSearchColumn(VARIANT_FALSE); EXTREELib::IColumnsPtr var_Columns = spTree1->GetColumns(); var_Columns->Add(L"Name"); var_Columns->Add(L"A"); var_Columns->Add(L"B"); var_Columns->Add(L"C"); EXTREELib::IItemsPtr var_Items = spTree1->GetItems(); long h = var_Items->AddItem("Group 1"); var_Items->PutCellHAlignment(h,long(0),EXTREELib::CenterAlignment); var_Items->PutItemDivider(h,0); var_Items->PutItemDividerLineAlignment(h,EXTREELib::DividerBoth); var_Items->PutItemHeight(h,24); var_Items->PutSortableItem(h,VARIANT_FALSE); long h1 = var_Items->InsertItem(h,long(0),"Child 1"); var_Items->PutCellCaption(h1,long(1),long(1)); var_Items->PutCellCaption(h1,long(2),long(2)); var_Items->PutCellCaption(h1,long(3),long(3)); h1 = var_Items->InsertItem(h,long(0),"Child 2"); var_Items->PutCellCaption(h1,long(1),long(4)); var_Items->PutCellCaption(h1,long(2),long(5)); var_Items->PutCellCaption(h1,long(3),long(6)); var_Items->PutExpandItem(h,VARIANT_TRUE); h = var_Items->AddItem("Group 2"); var_Items->PutCellHAlignment(h,long(0),EXTREELib::CenterAlignment); var_Items->PutItemDivider(h,0); var_Items->PutItemDividerLineAlignment(h,EXTREELib::DividerBoth); var_Items->PutItemHeight(h,24); var_Items->PutSortableItem(h,VARIANT_FALSE); h1 = var_Items->InsertItem(h,long(0),"Child 1"); var_Items->PutCellCaption(h1,long(1),long(1)); var_Items->PutCellCaption(h1,long(2),long(2)); var_Items->PutCellCaption(h1,long(3),long(3)); h1 = var_Items->InsertItem(h,long(0),"Child 2"); var_Items->PutCellCaption(h1,long(1),long(4)); var_Items->PutCellCaption(h1,long(2),long(5)); var_Items->PutCellCaption(h1,long(3),long(6)); var_Items->PutExpandItem(h,VARIANT_TRUE); spTree1->EndUpdate();
463. How can I collapse all items
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->BeginUpdate(); spTree1->PutLinesAtRoot(EXTREELib::exLinesAtRoot); spTree1->GetColumns()->Add(L"Items"); EXTREELib::IItemsPtr var_Items = spTree1->GetItems(); long h = var_Items->AddItem("Root 1"); var_Items->InsertItem(h,long(0),"Child 1"); var_Items->InsertItem(h,long(0),"Child 2"); h = var_Items->AddItem("Root 2"); var_Items->InsertItem(h,long(0),"Child 1"); var_Items->InsertItem(h,long(0),"Child 2"); var_Items->PutExpandItem(0,VARIANT_FALSE); spTree1->EndUpdate();
462. How can I expand all items
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->BeginUpdate(); spTree1->PutLinesAtRoot(EXTREELib::exLinesAtRoot); spTree1->GetColumns()->Add(L"Items"); EXTREELib::IItemsPtr var_Items = spTree1->GetItems(); long h = var_Items->AddItem("Root 1"); var_Items->InsertItem(h,long(0),"Child 1"); var_Items->InsertItem(h,long(0),"Child 2"); h = var_Items->AddItem("Root 2"); var_Items->InsertItem(h,long(0),"Child 1"); var_Items->InsertItem(h,long(0),"Child 2"); var_Items->PutExpandItem(0,VARIANT_TRUE); spTree1->EndUpdate();
461. Can I use PNG images to display pictures in the control
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->PutHTMLPicture(L"pic1","c:\\exontrol\\images\\card.png"); spTree1->PutHeaderHeight(48); ((EXTREELib::IColumnPtr)(spTree1->GetColumns()->Add(L"ColumnName")))->PutHTMLCaption(L"<b>HTML</b> Column <img>pic1</img> Picture");
460. Is it possible to move an item from a parent to another
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->BeginUpdate(); spTree1->PutLinesAtRoot(EXTREELib::exLinesAtRoot); spTree1->GetColumns()->Add(L"Items"); EXTREELib::IItemsPtr var_Items = spTree1->GetItems(); var_Items->AddItem("A"); var_Items->AddItem("B"); var_Items->InsertItem(var_Items->AddItem("C"),"","D"); var_Items->SetParent(var_Items->GetFindItem("D",long(0),vtMissing),var_Items->GetFindItem("A",long(0),vtMissing)); spTree1->EndUpdate();
459. How can I change the identation for an item
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->BeginUpdate(); spTree1->PutLinesAtRoot(EXTREELib::exLinesAtRoot); spTree1->GetColumns()->Add(L"Items"); EXTREELib::IItemsPtr var_Items = spTree1->GetItems(); var_Items->AddItem("A"); var_Items->AddItem("B"); var_Items->InsertItem(var_Items->AddItem("C"),"","D"); var_Items->SetParent(var_Items->GetFindItem("D",long(0),vtMissing),0); spTree1->EndUpdate();
458. How can I filter programatically using more columns
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->BeginUpdate(); spTree1->PutMarkSearchColumn(VARIANT_FALSE); EXTREELib::IColumnsPtr var_Columns = spTree1->GetColumns(); var_Columns->Add(L"Car"); var_Columns->Add(L"Equipment"); EXTREELib::IItemsPtr var_Items = spTree1->GetItems(); var_Items->PutCellCaption(var_Items->AddItem("Mazda"),long(1),"Air Bag"); var_Items->PutCellCaption(var_Items->AddItem("Toyota"),long(1),"Air Bag,Air condition"); var_Items->PutCellCaption(var_Items->AddItem("Ford"),long(1),"Air condition"); var_Items->PutCellCaption(var_Items->AddItem("Nissan"),long(1),"Air Bag,ABS,ESP"); var_Items->PutCellCaption(var_Items->AddItem("Mazda"),long(1),"Air Bag, ABS,ESP"); var_Items->PutCellCaption(var_Items->AddItem("Mazda"),long(1),"ABS,ESP"); EXTREELib::IColumnPtr var_Column = spTree1->GetColumns()->GetItem("Car"); var_Column->PutFilterType(EXTREELib::exFilter); var_Column->PutFilter(L"Mazda"); EXTREELib::IColumnPtr var_Column1 = spTree1->GetColumns()->GetItem("Equipment"); var_Column1->PutFilterType(EXTREELib::exPattern); var_Column1->PutFilter(L"*ABS*|*ESP*"); spTree1->ApplyFilter(); spTree1->EndUpdate();
457. Is it possible to colour a particular column, I mean the cell's foreground color
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->BeginUpdate(); EXTREELib::IConditionalFormatPtr var_ConditionalFormat = spTree1->GetConditionalFormats()->Add(L"1",vtMissing); var_ConditionalFormat->PutForeColor(RGB(255,0,0)); var_ConditionalFormat->PutApplyTo(EXTREELib::FormatApplyToEnum(0x1)); spTree1->PutMarkSearchColumn(VARIANT_FALSE); EXTREELib::IColumnsPtr var_Columns = spTree1->GetColumns(); var_Columns->Add(L"Column 1"); var_Columns->Add(L"Column 2"); EXTREELib::IItemsPtr var_Items = spTree1->GetItems(); var_Items->PutCellCaption(var_Items->AddItem(long(0)),long(1),long(1)); var_Items->PutCellCaption(var_Items->AddItem(long(2)),long(1),long(3)); var_Items->PutCellCaption(var_Items->AddItem(long(4)),long(1),long(5)); spTree1->EndUpdate();
456. Is it possible to colour a particular column for specified values
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->BeginUpdate(); EXTREELib::IConditionalFormatPtr var_ConditionalFormat = spTree1->GetConditionalFormats()->Add(L"int(%1) in (3,4,5)",vtMissing); var_ConditionalFormat->PutBackColor(RGB(255,0,0)); var_ConditionalFormat->PutApplyTo(EXTREELib::FormatApplyToEnum(0x1)); spTree1->PutMarkSearchColumn(VARIANT_FALSE); EXTREELib::IColumnsPtr var_Columns = spTree1->GetColumns(); var_Columns->Add(L"Column 1"); var_Columns->Add(L"Column 2"); EXTREELib::IItemsPtr var_Items = spTree1->GetItems(); var_Items->PutCellCaption(var_Items->AddItem(long(0)),long(1),long(1)); var_Items->PutCellCaption(var_Items->AddItem(long(2)),long(1),long(3)); var_Items->PutCellCaption(var_Items->AddItem(long(4)),long(1),long(5)); spTree1->EndUpdate();
455. Is it possible to colour a particular column
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->BeginUpdate(); spTree1->PutMarkSearchColumn(VARIANT_FALSE); EXTREELib::IColumnsPtr var_Columns = spTree1->GetColumns(); var_Columns->Add(L"Column 1"); ((EXTREELib::IColumnPtr)(var_Columns->Add(L"Column 2")))->PutDef(EXTREELib::exCellBackColor,long(255)); EXTREELib::IItemsPtr var_Items = spTree1->GetItems(); var_Items->PutCellCaption(var_Items->AddItem(long(0)),long(1),long(1)); var_Items->PutCellCaption(var_Items->AddItem(long(2)),long(1),long(3)); var_Items->PutCellCaption(var_Items->AddItem(long(4)),long(1),long(5)); spTree1->EndUpdate();
454. How do i get all the children items that are under a certain parent Item handle
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->BeginUpdate(); spTree1->PutLinesAtRoot(EXTREELib::exLinesAtRoot); spTree1->GetColumns()->Add(L"P"); EXTREELib::IItemsPtr var_Items = spTree1->GetItems(); long h = var_Items->AddItem("Root"); var_Items->InsertItem(h,long(0),"Child 1"); var_Items->InsertItem(h,long(0),"Child 2"); var_Items->PutExpandItem(h,VARIANT_TRUE); EXTREELib::IItemsPtr var_Items1 = spTree1->GetItems(); long hChild = var_Items1->GetItemChild(var_Items1->GetFirstVisibleItem()); OutputDebugStringW( _bstr_t(var_Items1->GetCellCaption(hChild,long(0))) ); OutputDebugStringW( _bstr_t(var_Items1->GetCellCaption(var_Items1->GetNextSiblingItem(hChild),long(0))) ); spTree1->EndUpdate();
453. How can I get the caption of focused item
// SelectionChanged event - Fired after a new item has been selected.
void OnSelectionChangedTree1()
{
/*
Copy and paste the following directives to your header file as
it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library'
#import <ExTree.dll>
using namespace EXTREELib;
*/
EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown();
EXTREELib::IItemsPtr var_Items = spTree1->GetItems();
OutputDebugStringW( L"Handle" );
OutputDebugStringW( _bstr_t(var_Items->GetFocusItem()) );
OutputDebugStringW( L"Caption" );
OutputDebugStringW( _bstr_t(var_Items->GetCellCaption(var_Items->GetFocusItem(),long(0))) );
}
EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown();
spTree1->BeginUpdate();
spTree1->PutLinesAtRoot(EXTREELib::exLinesAtRoot);
spTree1->GetColumns()->Add(L"Items");
EXTREELib::IItemsPtr var_Items = spTree1->GetItems();
long h = var_Items->AddItem("R1");
var_Items->InsertItem(h,long(0),"Cell 1.1");
var_Items->InsertItem(h,long(0),"Cell 1.2");
var_Items->PutExpandItem(h,VARIANT_TRUE);
h = var_Items->AddItem("R2");
var_Items->InsertItem(h,long(0),"Cell 2.1");
var_Items->InsertItem(h,long(0),"Cell 2.2");
var_Items->PutExpandItem(h,VARIANT_TRUE);
spTree1->EndUpdate();
452. How can I get the caption of selected item
// SelectionChanged event - Fired after a new item has been selected.
void OnSelectionChangedTree1()
{
/*
Copy and paste the following directives to your header file as
it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library'
#import <ExTree.dll>
using namespace EXTREELib;
*/
EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown();
EXTREELib::IItemsPtr var_Items = spTree1->GetItems();
OutputDebugStringW( L"Handle" );
OutputDebugStringW( _bstr_t(var_Items->GetSelectedItem(0)) );
OutputDebugStringW( L"Caption" );
OutputDebugStringW( _bstr_t(var_Items->GetCellCaption(var_Items->GetSelectedItem(0),long(0))) );
}
EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown();
spTree1->BeginUpdate();
spTree1->PutLinesAtRoot(EXTREELib::exLinesAtRoot);
spTree1->GetColumns()->Add(L"Items");
EXTREELib::IItemsPtr var_Items = spTree1->GetItems();
long h = var_Items->AddItem("R1");
var_Items->InsertItem(h,long(0),"Cell 1.1");
var_Items->InsertItem(h,long(0),"Cell 1.2");
var_Items->PutExpandItem(h,VARIANT_TRUE);
h = var_Items->AddItem("R2");
var_Items->InsertItem(h,long(0),"Cell 2.1");
var_Items->InsertItem(h,long(0),"Cell 2.2");
var_Items->PutExpandItem(h,VARIANT_TRUE);
spTree1->EndUpdate();
451. Can I display the cell's check box after the text
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); EXTREELib::IColumnPtr var_Column = ((EXTREELib::IColumnPtr)(spTree1->GetColumns()->Add(L"Column"))); var_Column->PutDef(EXTREELib::exCellHasCheckBox,VARIANT_TRUE); var_Column->PutDef(EXTREELib::exCellDrawPartsOrder,"caption,check"); EXTREELib::IItemsPtr var_Items = spTree1->GetItems(); var_Items->PutCellHasCheckBox(var_Items->AddItem("Caption 1"),long(0),VARIANT_TRUE); var_Items->PutCellHasCheckBox(var_Items->AddItem("Caption 2"),long(0),VARIANT_TRUE);
450. Can I change the order of the parts in the cell, as checkbox after the text, and so on
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->Images(_bstr_t("gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0") + "/oFBoVDolFo1HpFJpVLplNp1PqFRqVTqlVq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1" + "/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m0ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qO" + "x3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/y" + "NAOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA="); ((EXTREELib::IColumnPtr)(spTree1->GetColumns()->Add(L"Column")))->PutDef(EXTREELib::exCellDrawPartsOrder,"caption,check,icon,icons,picture"); EXTREELib::IItemsPtr var_Items = spTree1->GetItems(); long h = var_Items->AddItem("Text"); var_Items->PutCellImage(h,long(0),1); var_Items->PutCellHasCheckBox(h,long(0),VARIANT_TRUE);
449. Can I have an image displayed after the text. Can I get that effect without using HTML content
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->Images(_bstr_t("gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0") + "/oFBoVDolFo1HpFJpVLplNp1PqFRqVTqlVq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1" + "/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m0ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qO" + "x3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/y" + "NAOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA="); ((EXTREELib::IColumnPtr)(spTree1->GetColumns()->Add(L"Column")))->PutDef(EXTREELib::exCellDrawPartsOrder,"caption,icon,check,icons,picture"); EXTREELib::IItemsPtr var_Items = spTree1->GetItems(); long h = var_Items->AddItem("Text"); var_Items->PutCellImage(h,long(0),1);
448. Does your control support RightToLeft property for RTL languages or right to left
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->BeginUpdate(); spTree1->PutScrollBars(EXTREELib::exDisableBoth); spTree1->PutLinesAtRoot(EXTREELib::exLinesAtRoot); EXTREELib::IColumnPtr var_Column = ((EXTREELib::IColumnPtr)(spTree1->GetColumns()->Add(L"P1"))); var_Column->PutDef(EXTREELib::exCellHasCheckBox,VARIANT_TRUE); var_Column->PutPartialCheck(VARIANT_TRUE); EXTREELib::IItemsPtr var_Items = spTree1->GetItems(); long h = var_Items->AddItem("Root"); var_Items->InsertItem(h,long(0),"Child 1"); var_Items->InsertItem(h,long(0),"Child 2"); var_Items->PutExpandItem(h,VARIANT_TRUE); spTree1->PutRightToLeft(VARIANT_TRUE); spTree1->EndUpdate();
447. Is there any way to display the vertical scroll bar on the left side, as I want to align my data to the right
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->BeginUpdate(); spTree1->PutScrollBars(EXTREELib::exDisableBoth); EXTREELib::IColumnsPtr var_Columns = spTree1->GetColumns(); var_Columns->Add(L"C1"); var_Columns->Add(L"C2"); var_Columns->Add(L"C3"); var_Columns->Add(L"C4"); var_Columns->Add(L"C5"); var_Columns->Add(L"C6"); var_Columns->Add(L"C7"); var_Columns->Add(L"C8"); spTree1->PutRightToLeft(VARIANT_TRUE); spTree1->EndUpdate();
446. How can I use the CASE statement (CASE usage)
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->BeginUpdate(); ((EXTREELib::IColumnPtr)(spTree1->GetColumns()->Add(L"Value")))->PutWidth(24); EXTREELib::IColumnPtr var_Column = ((EXTREELib::IColumnPtr)(spTree1->GetColumns()->Add(L"CASE - statment"))); var_Column->PutComputedField(_bstr_t("%0 case (default:'not found';1:%0;2:2*%0;3:3*%0;4:4*%0;5:5*%0;7:'Seven';8:'Eight';9:'Nine';11:'") + "Eleven';13:'Thirtheen';14:'Fourtheen')"); var_Column->PutToolTip(var_Column->GetComputedField()); EXTREELib::IItemsPtr var_Items = spTree1->GetItems(); var_Items->AddItem(long(0)); var_Items->AddItem(long(1)); var_Items->AddItem(long(2)); spTree1->EndUpdate();
445. How can I use the CASE statement (CASE usage)
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->BeginUpdate(); ((EXTREELib::IColumnPtr)(spTree1->GetColumns()->Add(L"Value")))->PutWidth(24); EXTREELib::IColumnPtr var_Column = ((EXTREELib::IColumnPtr)(spTree1->GetColumns()->Add(L"CASE - statment"))); var_Column->PutComputedField(_bstr_t("%0 case (default:'not found';1:'One';2:'Two';3:'Three';4:'Four';5:'Five';7:'Seven';8:'Eight';9:") + "'Nine';11:'Eleven';13:'Thirtheen';14:'Fourtheen')"); var_Column->PutToolTip(var_Column->GetComputedField()); EXTREELib::IItemsPtr var_Items = spTree1->GetItems(); var_Items->AddItem(long(0)); var_Items->AddItem(long(1)); var_Items->AddItem(long(2)); spTree1->EndUpdate();
444. I have seen the IN function but it returns -1 or 0. How can I display the value being found ( SWITCH usage )
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->BeginUpdate(); ((EXTREELib::IColumnPtr)(spTree1->GetColumns()->Add(L"Value")))->PutWidth(24); EXTREELib::IColumnPtr var_Column = ((EXTREELib::IColumnPtr)(spTree1->GetColumns()->Add(L"SWITCH - statment"))); var_Column->PutComputedField(L"%0 switch ('not found', 1,2,3,4,5,7,8,9,11,13,14)"); var_Column->PutToolTip(var_Column->GetComputedField()); EXTREELib::IItemsPtr var_Items = spTree1->GetItems(); var_Items->AddItem(long(0)); var_Items->AddItem(long(1)); var_Items->AddItem(long(2)); spTree1->EndUpdate();
443. I have a large collection of constant values and using or operator is a time consuming (IN usage). Is there any way to increase the speed to check if a value maches the collection
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->BeginUpdate(); ((EXTREELib::IColumnPtr)(spTree1->GetColumns()->Add(L"Value")))->PutWidth(24); EXTREELib::IColumnPtr var_Column = ((EXTREELib::IColumnPtr)(spTree1->GetColumns()->Add(L"IN - statment"))); var_Column->PutComputedField(L"%0 in (1,2,3,4,5,7,8,9,11,13,14) ? 'found' : ''"); var_Column->PutToolTip(var_Column->GetComputedField()); EXTREELib::IItemsPtr var_Items = spTree1->GetItems(); var_Items->AddItem(long(0)); var_Items->AddItem(long(1)); var_Items->AddItem(long(2)); spTree1->EndUpdate();
442. Is is possible to use HTML tags to display in the filter caption
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->BeginUpdate(); spTree1->PutFilterBarPromptVisible(VARIANT_TRUE); spTree1->PutFilterBarCaption(L"This is a bit of text being displayed in the filter bar."); spTree1->GetColumns()->Add(L""); EXTREELib::IItemsPtr var_Items = spTree1->GetItems(); var_Items->AddItem("Item 1"); var_Items->AddItem("Item 2"); var_Items->AddItem("Item 3"); spTree1->EndUpdate();
441. How can I find the number of items after filtering
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->BeginUpdate(); spTree1->GetColumns()->Add(L""); EXTREELib::IItemsPtr var_Items = spTree1->GetItems(); long h = var_Items->AddItem(""); var_Items->PutCellCaption(h,long(0),var_Items->GetVisibleItemCount()); spTree1->EndUpdate();
440. How can I change the filter caption
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->BeginUpdate(); spTree1->PutColumnAutoResize(VARIANT_TRUE); spTree1->PutContinueColumnScroll(VARIANT_FALSE); spTree1->PutMarkSearchColumn(VARIANT_FALSE); spTree1->PutSearchColumnIndex(1); spTree1->PutFilterBarPromptVisible(VARIANT_TRUE); spTree1->PutFilterBarPromptType(EXTREELib::FilterPromptEnum(0x2000 | EXTREELib::exFilterPromptContainsAll | EXTREELib::exFilterPromptStartWords)); spTree1->PutFilterBarPromptPattern(L"london robert"); spTree1->PutFilterBarCaption(L"<r>Found: ... "); EXTREELib::IColumnsPtr var_Columns = spTree1->GetColumns(); ((EXTREELib::IColumnPtr)(var_Columns->Add(L"Name")))->PutWidth(96); ((EXTREELib::IColumnPtr)(var_Columns->Add(L"Title")))->PutWidth(96); var_Columns->Add(L"City"); EXTREELib::IItemsPtr var_Items = spTree1->GetItems(); long h0 = var_Items->AddItem("Nancy Davolio"); var_Items->PutCellCaption(h0,long(1),"Sales Representative"); var_Items->PutCellCaption(h0,long(2),"Seattle"); h0 = var_Items->AddItem("Andrew Fuller"); var_Items->PutCellCaption(h0,long(1),"Vice President, Sales"); var_Items->PutCellCaption(h0,long(2),"Tacoma"); var_Items->PutSelectItem(h0,VARIANT_TRUE); h0 = var_Items->AddItem("Janet Leverling"); var_Items->PutCellCaption(h0,long(1),"Sales Representative"); var_Items->PutCellCaption(h0,long(2),"Kirkland"); h0 = var_Items->AddItem("Margaret Peacock"); var_Items->PutCellCaption(h0,long(1),"Sales Representative"); var_Items->PutCellCaption(h0,long(2),"Redmond"); h0 = var_Items->AddItem("Steven Buchanan"); var_Items->PutCellCaption(h0,long(1),"Sales Manager"); var_Items->PutCellCaption(h0,long(2),"London"); h0 = var_Items->AddItem("Michael Suyama"); var_Items->PutCellCaption(h0,long(1),"Sales Representative"); var_Items->PutCellCaption(h0,long(2),"London"); h0 = var_Items->AddItem("Robert King"); var_Items->PutCellCaption(h0,long(1),"Sales Representative"); var_Items->PutCellCaption(h0,long(2),"London"); h0 = var_Items->AddItem("Laura Callahan"); var_Items->PutCellCaption(h0,long(1),"Inside Sales Coordinator"); var_Items->PutCellCaption(h0,long(2),"Seattle"); h0 = var_Items->AddItem("Anne Dodsworth"); var_Items->PutCellCaption(h0,long(1),"Sales Representative"); var_Items->PutCellCaption(h0,long(2),"London"); spTree1->EndUpdate();
439. While using the filter prompt is it is possible to use wild characters
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->BeginUpdate(); spTree1->PutColumnAutoResize(VARIANT_TRUE); spTree1->PutContinueColumnScroll(VARIANT_FALSE); spTree1->PutMarkSearchColumn(VARIANT_FALSE); spTree1->PutSearchColumnIndex(1); spTree1->PutFilterBarPromptVisible(VARIANT_TRUE); spTree1->PutFilterBarPromptType(EXTREELib::exFilterPromptPattern); spTree1->PutFilterBarPromptPattern(L"lon* seat*"); EXTREELib::IColumnsPtr var_Columns = spTree1->GetColumns(); ((EXTREELib::IColumnPtr)(var_Columns->Add(L"Name")))->PutWidth(96); ((EXTREELib::IColumnPtr)(var_Columns->Add(L"Title")))->PutWidth(96); var_Columns->Add(L"City"); EXTREELib::IItemsPtr var_Items = spTree1->GetItems(); long h0 = var_Items->AddItem("Nancy Davolio"); var_Items->PutCellCaption(h0,long(1),"Sales Representative"); var_Items->PutCellCaption(h0,long(2),"Seattle"); h0 = var_Items->AddItem("Andrew Fuller"); var_Items->PutCellCaption(h0,long(1),"Vice President, Sales"); var_Items->PutCellCaption(h0,long(2),"Tacoma"); var_Items->PutSelectItem(h0,VARIANT_TRUE); h0 = var_Items->AddItem("Janet Leverling"); var_Items->PutCellCaption(h0,long(1),"Sales Representative"); var_Items->PutCellCaption(h0,long(2),"Kirkland"); h0 = var_Items->AddItem("Margaret Peacock"); var_Items->PutCellCaption(h0,long(1),"Sales Representative"); var_Items->PutCellCaption(h0,long(2),"Redmond"); h0 = var_Items->AddItem("Steven Buchanan"); var_Items->PutCellCaption(h0,long(1),"Sales Manager"); var_Items->PutCellCaption(h0,long(2),"London"); h0 = var_Items->AddItem("Michael Suyama"); var_Items->PutCellCaption(h0,long(1),"Sales Representative"); var_Items->PutCellCaption(h0,long(2),"London"); h0 = var_Items->AddItem("Robert King"); var_Items->PutCellCaption(h0,long(1),"Sales Representative"); var_Items->PutCellCaption(h0,long(2),"London"); h0 = var_Items->AddItem("Laura Callahan"); var_Items->PutCellCaption(h0,long(1),"Inside Sales Coordinator"); var_Items->PutCellCaption(h0,long(2),"Seattle"); h0 = var_Items->AddItem("Anne Dodsworth"); var_Items->PutCellCaption(h0,long(1),"Sales Representative"); var_Items->PutCellCaption(h0,long(2),"London"); spTree1->EndUpdate();
438. How can I list all items that contains any of specified words, not necessary at the beggining
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->BeginUpdate(); spTree1->PutColumnAutoResize(VARIANT_TRUE); spTree1->PutContinueColumnScroll(VARIANT_FALSE); spTree1->PutMarkSearchColumn(VARIANT_FALSE); spTree1->PutSearchColumnIndex(1); spTree1->PutFilterBarPromptVisible(VARIANT_TRUE); spTree1->PutFilterBarPromptType(EXTREELib::exFilterPromptContainsAny | EXTREELib::exFilterPromptStartWords); spTree1->PutFilterBarPromptPattern(L"london davolio"); EXTREELib::IColumnsPtr var_Columns = spTree1->GetColumns(); ((EXTREELib::IColumnPtr)(var_Columns->Add(L"Name")))->PutWidth(96); ((EXTREELib::IColumnPtr)(var_Columns->Add(L"Title")))->PutWidth(96); var_Columns->Add(L"City"); EXTREELib::IItemsPtr var_Items = spTree1->GetItems(); long h0 = var_Items->AddItem("Nancy Davolio"); var_Items->PutCellCaption(h0,long(1),"Sales Representative"); var_Items->PutCellCaption(h0,long(2),"Seattle"); h0 = var_Items->AddItem("Andrew Fuller"); var_Items->PutCellCaption(h0,long(1),"Vice President, Sales"); var_Items->PutCellCaption(h0,long(2),"Tacoma"); var_Items->PutSelectItem(h0,VARIANT_TRUE); h0 = var_Items->AddItem("Janet Leverling"); var_Items->PutCellCaption(h0,long(1),"Sales Representative"); var_Items->PutCellCaption(h0,long(2),"Kirkland"); h0 = var_Items->AddItem("Margaret Peacock"); var_Items->PutCellCaption(h0,long(1),"Sales Representative"); var_Items->PutCellCaption(h0,long(2),"Redmond"); h0 = var_Items->AddItem("Steven Buchanan"); var_Items->PutCellCaption(h0,long(1),"Sales Manager"); var_Items->PutCellCaption(h0,long(2),"London"); h0 = var_Items->AddItem("Michael Suyama"); var_Items->PutCellCaption(h0,long(1),"Sales Representative"); var_Items->PutCellCaption(h0,long(2),"London"); h0 = var_Items->AddItem("Robert King"); var_Items->PutCellCaption(h0,long(1),"Sales Representative"); var_Items->PutCellCaption(h0,long(2),"London"); h0 = var_Items->AddItem("Laura Callahan"); var_Items->PutCellCaption(h0,long(1),"Inside Sales Coordinator"); var_Items->PutCellCaption(h0,long(2),"Seattle"); h0 = var_Items->AddItem("Anne Dodsworth"); var_Items->PutCellCaption(h0,long(1),"Sales Representative"); var_Items->PutCellCaption(h0,long(2),"London"); spTree1->EndUpdate();
437. How can I list all items that contains any of specified words, not strings
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->BeginUpdate(); spTree1->PutColumnAutoResize(VARIANT_TRUE); spTree1->PutContinueColumnScroll(VARIANT_FALSE); spTree1->PutMarkSearchColumn(VARIANT_FALSE); spTree1->PutSearchColumnIndex(1); spTree1->PutFilterBarPromptVisible(VARIANT_TRUE); spTree1->PutFilterBarPromptType(EXTREELib::FilterPromptEnum(0x2000 | EXTREELib::exFilterPromptContainsAny | EXTREELib::exFilterPromptStartWords)); spTree1->PutFilterBarPromptPattern(L"london nancy"); EXTREELib::IColumnsPtr var_Columns = spTree1->GetColumns(); ((EXTREELib::IColumnPtr)(var_Columns->Add(L"Name")))->PutWidth(96); ((EXTREELib::IColumnPtr)(var_Columns->Add(L"Title")))->PutWidth(96); var_Columns->Add(L"City"); EXTREELib::IItemsPtr var_Items = spTree1->GetItems(); long h0 = var_Items->AddItem("Nancy Davolio"); var_Items->PutCellCaption(h0,long(1),"Sales Representative"); var_Items->PutCellCaption(h0,long(2),"Seattle"); h0 = var_Items->AddItem("Andrew Fuller"); var_Items->PutCellCaption(h0,long(1),"Vice President, Sales"); var_Items->PutCellCaption(h0,long(2),"Tacoma"); var_Items->PutSelectItem(h0,VARIANT_TRUE); h0 = var_Items->AddItem("Janet Leverling"); var_Items->PutCellCaption(h0,long(1),"Sales Representative"); var_Items->PutCellCaption(h0,long(2),"Kirkland"); h0 = var_Items->AddItem("Margaret Peacock"); var_Items->PutCellCaption(h0,long(1),"Sales Representative"); var_Items->PutCellCaption(h0,long(2),"Redmond"); h0 = var_Items->AddItem("Steven Buchanan"); var_Items->PutCellCaption(h0,long(1),"Sales Manager"); var_Items->PutCellCaption(h0,long(2),"London"); h0 = var_Items->AddItem("Michael Suyama"); var_Items->PutCellCaption(h0,long(1),"Sales Representative"); var_Items->PutCellCaption(h0,long(2),"London"); h0 = var_Items->AddItem("Robert King"); var_Items->PutCellCaption(h0,long(1),"Sales Representative"); var_Items->PutCellCaption(h0,long(2),"London"); h0 = var_Items->AddItem("Laura Callahan"); var_Items->PutCellCaption(h0,long(1),"Inside Sales Coordinator"); var_Items->PutCellCaption(h0,long(2),"Seattle"); h0 = var_Items->AddItem("Anne Dodsworth"); var_Items->PutCellCaption(h0,long(1),"Sales Representative"); var_Items->PutCellCaption(h0,long(2),"London"); spTree1->EndUpdate();
436. How can I list all items that contains all specified words, not strings
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->BeginUpdate(); spTree1->PutColumnAutoResize(VARIANT_TRUE); spTree1->PutContinueColumnScroll(VARIANT_FALSE); spTree1->PutMarkSearchColumn(VARIANT_FALSE); spTree1->PutSearchColumnIndex(1); spTree1->PutFilterBarPromptVisible(VARIANT_TRUE); spTree1->PutFilterBarPromptType(EXTREELib::FilterPromptEnum(0x2000 | EXTREELib::exFilterPromptContainsAll | EXTREELib::exFilterPromptStartWords)); spTree1->PutFilterBarPromptPattern(L"london robert"); EXTREELib::IColumnsPtr var_Columns = spTree1->GetColumns(); ((EXTREELib::IColumnPtr)(var_Columns->Add(L"Name")))->PutWidth(96); ((EXTREELib::IColumnPtr)(var_Columns->Add(L"Title")))->PutWidth(96); var_Columns->Add(L"City"); EXTREELib::IItemsPtr var_Items = spTree1->GetItems(); long h0 = var_Items->AddItem("Nancy Davolio"); var_Items->PutCellCaption(h0,long(1),"Sales Representative"); var_Items->PutCellCaption(h0,long(2),"Seattle"); h0 = var_Items->AddItem("Andrew Fuller"); var_Items->PutCellCaption(h0,long(1),"Vice President, Sales"); var_Items->PutCellCaption(h0,long(2),"Tacoma"); var_Items->PutSelectItem(h0,VARIANT_TRUE); h0 = var_Items->AddItem("Janet Leverling"); var_Items->PutCellCaption(h0,long(1),"Sales Representative"); var_Items->PutCellCaption(h0,long(2),"Kirkland"); h0 = var_Items->AddItem("Margaret Peacock"); var_Items->PutCellCaption(h0,long(1),"Sales Representative"); var_Items->PutCellCaption(h0,long(2),"Redmond"); h0 = var_Items->AddItem("Steven Buchanan"); var_Items->PutCellCaption(h0,long(1),"Sales Manager"); var_Items->PutCellCaption(h0,long(2),"London"); h0 = var_Items->AddItem("Michael Suyama"); var_Items->PutCellCaption(h0,long(1),"Sales Representative"); var_Items->PutCellCaption(h0,long(2),"London"); h0 = var_Items->AddItem("Robert King"); var_Items->PutCellCaption(h0,long(1),"Sales Representative"); var_Items->PutCellCaption(h0,long(2),"London"); h0 = var_Items->AddItem("Laura Callahan"); var_Items->PutCellCaption(h0,long(1),"Inside Sales Coordinator"); var_Items->PutCellCaption(h0,long(2),"Seattle"); h0 = var_Items->AddItem("Anne Dodsworth"); var_Items->PutCellCaption(h0,long(1),"Sales Representative"); var_Items->PutCellCaption(h0,long(2),"London"); spTree1->EndUpdate();
435. I've noticed that the filtering by prompt is not case sensitive, is is possible to make it case sensitive
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->BeginUpdate(); spTree1->PutColumnAutoResize(VARIANT_TRUE); spTree1->PutContinueColumnScroll(VARIANT_FALSE); spTree1->PutMarkSearchColumn(VARIANT_FALSE); spTree1->PutSearchColumnIndex(1); spTree1->PutFilterBarPromptVisible(VARIANT_TRUE); spTree1->PutFilterBarPromptType(EXTREELib::exFilterPromptContainsAny | EXTREELib::exFilterPromptCaseSensitive); spTree1->PutFilterBarPromptPattern(L"Anne"); EXTREELib::IColumnsPtr var_Columns = spTree1->GetColumns(); ((EXTREELib::IColumnPtr)(var_Columns->Add(L"Name")))->PutWidth(96); ((EXTREELib::IColumnPtr)(var_Columns->Add(L"Title")))->PutWidth(96); var_Columns->Add(L"City"); EXTREELib::IItemsPtr var_Items = spTree1->GetItems(); long h0 = var_Items->AddItem("Nancy Davolio"); var_Items->PutCellCaption(h0,long(1),"Sales Representative"); var_Items->PutCellCaption(h0,long(2),"Seattle"); h0 = var_Items->AddItem("Andrew Fuller"); var_Items->PutCellCaption(h0,long(1),"Vice President, Sales"); var_Items->PutCellCaption(h0,long(2),"Tacoma"); var_Items->PutSelectItem(h0,VARIANT_TRUE); h0 = var_Items->AddItem("Janet Leverling"); var_Items->PutCellCaption(h0,long(1),"Sales Representative"); var_Items->PutCellCaption(h0,long(2),"Kirkland"); h0 = var_Items->AddItem("Margaret Peacock"); var_Items->PutCellCaption(h0,long(1),"Sales Representative"); var_Items->PutCellCaption(h0,long(2),"Redmond"); h0 = var_Items->AddItem("Steven Buchanan"); var_Items->PutCellCaption(h0,long(1),"Sales Manager"); var_Items->PutCellCaption(h0,long(2),"London"); h0 = var_Items->AddItem("Michael Suyama"); var_Items->PutCellCaption(h0,long(1),"Sales Representative"); var_Items->PutCellCaption(h0,long(2),"London"); h0 = var_Items->AddItem("Robert King"); var_Items->PutCellCaption(h0,long(1),"Sales Representative"); var_Items->PutCellCaption(h0,long(2),"London"); h0 = var_Items->AddItem("Laura Callahan"); var_Items->PutCellCaption(h0,long(1),"Inside Sales Coordinator"); var_Items->PutCellCaption(h0,long(2),"Seattle"); h0 = var_Items->AddItem("Anne Dodsworth"); var_Items->PutCellCaption(h0,long(1),"Sales Representative"); var_Items->PutCellCaption(h0,long(2),"London"); spTree1->EndUpdate();
434. Is it possible to list only items that ends with any of specified strings
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->BeginUpdate(); spTree1->PutColumnAutoResize(VARIANT_TRUE); spTree1->PutContinueColumnScroll(VARIANT_FALSE); spTree1->PutMarkSearchColumn(VARIANT_FALSE); spTree1->PutSearchColumnIndex(1); spTree1->PutFilterBarPromptVisible(VARIANT_TRUE); spTree1->PutFilterBarPromptType(EXTREELib::exFilterPromptEndWith); spTree1->PutFilterBarPromptColumns("0"); spTree1->PutFilterBarPromptPattern(L"Fuller"); EXTREELib::IColumnsPtr var_Columns = spTree1->GetColumns(); ((EXTREELib::IColumnPtr)(var_Columns->Add(L"Name")))->PutWidth(96); ((EXTREELib::IColumnPtr)(var_Columns->Add(L"Title")))->PutWidth(96); var_Columns->Add(L"City"); EXTREELib::IItemsPtr var_Items = spTree1->GetItems(); long h0 = var_Items->AddItem("Nancy Davolio"); var_Items->PutCellCaption(h0,long(1),"Sales Representative"); var_Items->PutCellCaption(h0,long(2),"Seattle"); h0 = var_Items->AddItem("Andrew Fuller"); var_Items->PutCellCaption(h0,long(1),"Vice President, Sales"); var_Items->PutCellCaption(h0,long(2),"Tacoma"); var_Items->PutSelectItem(h0,VARIANT_TRUE); h0 = var_Items->AddItem("Janet Leverling"); var_Items->PutCellCaption(h0,long(1),"Sales Representative"); var_Items->PutCellCaption(h0,long(2),"Kirkland"); h0 = var_Items->AddItem("Margaret Peacock"); var_Items->PutCellCaption(h0,long(1),"Sales Representative"); var_Items->PutCellCaption(h0,long(2),"Redmond"); h0 = var_Items->AddItem("Steven Buchanan"); var_Items->PutCellCaption(h0,long(1),"Sales Manager"); var_Items->PutCellCaption(h0,long(2),"London"); h0 = var_Items->AddItem("Michael Suyama"); var_Items->PutCellCaption(h0,long(1),"Sales Representative"); var_Items->PutCellCaption(h0,long(2),"London"); h0 = var_Items->AddItem("Robert King"); var_Items->PutCellCaption(h0,long(1),"Sales Representative"); var_Items->PutCellCaption(h0,long(2),"London"); h0 = var_Items->AddItem("Laura Callahan"); var_Items->PutCellCaption(h0,long(1),"Inside Sales Coordinator"); var_Items->PutCellCaption(h0,long(2),"Seattle"); h0 = var_Items->AddItem("Anne Dodsworth"); var_Items->PutCellCaption(h0,long(1),"Sales Representative"); var_Items->PutCellCaption(h0,long(2),"London"); spTree1->EndUpdate();
433. Is it possible to list only items that ends with any of specified strings
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->BeginUpdate(); spTree1->PutColumnAutoResize(VARIANT_TRUE); spTree1->PutContinueColumnScroll(VARIANT_FALSE); spTree1->PutMarkSearchColumn(VARIANT_FALSE); spTree1->PutSearchColumnIndex(1); spTree1->PutFilterBarPromptVisible(VARIANT_TRUE); spTree1->PutFilterBarPromptType(EXTREELib::exFilterPromptEndWith); spTree1->PutFilterBarPromptColumns("0"); spTree1->PutFilterBarPromptPattern(L"Fuller"); EXTREELib::IColumnsPtr var_Columns = spTree1->GetColumns(); ((EXTREELib::IColumnPtr)(var_Columns->Add(L"Name")))->PutWidth(96); ((EXTREELib::IColumnPtr)(var_Columns->Add(L"Title")))->PutWidth(96); var_Columns->Add(L"City"); EXTREELib::IItemsPtr var_Items = spTree1->GetItems(); long h0 = var_Items->AddItem("Nancy Davolio"); var_Items->PutCellCaption(h0,long(1),"Sales Representative"); var_Items->PutCellCaption(h0,long(2),"Seattle"); h0 = var_Items->AddItem("Andrew Fuller"); var_Items->PutCellCaption(h0,long(1),"Vice President, Sales"); var_Items->PutCellCaption(h0,long(2),"Tacoma"); var_Items->PutSelectItem(h0,VARIANT_TRUE); h0 = var_Items->AddItem("Janet Leverling"); var_Items->PutCellCaption(h0,long(1),"Sales Representative"); var_Items->PutCellCaption(h0,long(2),"Kirkland"); h0 = var_Items->AddItem("Margaret Peacock"); var_Items->PutCellCaption(h0,long(1),"Sales Representative"); var_Items->PutCellCaption(h0,long(2),"Redmond"); h0 = var_Items->AddItem("Steven Buchanan"); var_Items->PutCellCaption(h0,long(1),"Sales Manager"); var_Items->PutCellCaption(h0,long(2),"London"); h0 = var_Items->AddItem("Michael Suyama"); var_Items->PutCellCaption(h0,long(1),"Sales Representative"); var_Items->PutCellCaption(h0,long(2),"London"); h0 = var_Items->AddItem("Robert King"); var_Items->PutCellCaption(h0,long(1),"Sales Representative"); var_Items->PutCellCaption(h0,long(2),"London"); h0 = var_Items->AddItem("Laura Callahan"); var_Items->PutCellCaption(h0,long(1),"Inside Sales Coordinator"); var_Items->PutCellCaption(h0,long(2),"Seattle"); h0 = var_Items->AddItem("Anne Dodsworth"); var_Items->PutCellCaption(h0,long(1),"Sales Representative"); var_Items->PutCellCaption(h0,long(2),"London"); spTree1->EndUpdate();
432. Is it possible to list only items that starts with any of specified strings
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->BeginUpdate(); spTree1->PutColumnAutoResize(VARIANT_TRUE); spTree1->PutContinueColumnScroll(VARIANT_FALSE); spTree1->PutMarkSearchColumn(VARIANT_FALSE); spTree1->PutSearchColumnIndex(1); spTree1->PutFilterBarPromptVisible(VARIANT_TRUE); spTree1->PutFilterBarPromptType(EXTREELib::exFilterPromptStartWith); spTree1->PutFilterBarPromptColumns("0"); spTree1->PutFilterBarPromptPattern(L"An M"); EXTREELib::IColumnsPtr var_Columns = spTree1->GetColumns(); ((EXTREELib::IColumnPtr)(var_Columns->Add(L"Name")))->PutWidth(96); ((EXTREELib::IColumnPtr)(var_Columns->Add(L"Title")))->PutWidth(96); var_Columns->Add(L"City"); EXTREELib::IItemsPtr var_Items = spTree1->GetItems(); long h0 = var_Items->AddItem("Nancy Davolio"); var_Items->PutCellCaption(h0,long(1),"Sales Representative"); var_Items->PutCellCaption(h0,long(2),"Seattle"); h0 = var_Items->AddItem("Andrew Fuller"); var_Items->PutCellCaption(h0,long(1),"Vice President, Sales"); var_Items->PutCellCaption(h0,long(2),"Tacoma"); var_Items->PutSelectItem(h0,VARIANT_TRUE); h0 = var_Items->AddItem("Janet Leverling"); var_Items->PutCellCaption(h0,long(1),"Sales Representative"); var_Items->PutCellCaption(h0,long(2),"Kirkland"); h0 = var_Items->AddItem("Margaret Peacock"); var_Items->PutCellCaption(h0,long(1),"Sales Representative"); var_Items->PutCellCaption(h0,long(2),"Redmond"); h0 = var_Items->AddItem("Steven Buchanan"); var_Items->PutCellCaption(h0,long(1),"Sales Manager"); var_Items->PutCellCaption(h0,long(2),"London"); h0 = var_Items->AddItem("Michael Suyama"); var_Items->PutCellCaption(h0,long(1),"Sales Representative"); var_Items->PutCellCaption(h0,long(2),"London"); h0 = var_Items->AddItem("Robert King"); var_Items->PutCellCaption(h0,long(1),"Sales Representative"); var_Items->PutCellCaption(h0,long(2),"London"); h0 = var_Items->AddItem("Laura Callahan"); var_Items->PutCellCaption(h0,long(1),"Inside Sales Coordinator"); var_Items->PutCellCaption(h0,long(2),"Seattle"); h0 = var_Items->AddItem("Anne Dodsworth"); var_Items->PutCellCaption(h0,long(1),"Sales Representative"); var_Items->PutCellCaption(h0,long(2),"London"); spTree1->EndUpdate();
431. Is it possible to list only items that starts with specified string
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->BeginUpdate(); spTree1->PutColumnAutoResize(VARIANT_TRUE); spTree1->PutContinueColumnScroll(VARIANT_FALSE); spTree1->PutMarkSearchColumn(VARIANT_FALSE); spTree1->PutSearchColumnIndex(1); spTree1->PutFilterBarPromptVisible(VARIANT_TRUE); spTree1->PutFilterBarPromptType(EXTREELib::exFilterPromptStartWith); spTree1->PutFilterBarPromptColumns("0"); spTree1->PutFilterBarPromptPattern(L"A"); EXTREELib::IColumnsPtr var_Columns = spTree1->GetColumns(); ((EXTREELib::IColumnPtr)(var_Columns->Add(L"Name")))->PutWidth(96); ((EXTREELib::IColumnPtr)(var_Columns->Add(L"Title")))->PutWidth(96); var_Columns->Add(L"City"); EXTREELib::IItemsPtr var_Items = spTree1->GetItems(); long h0 = var_Items->AddItem("Nancy Davolio"); var_Items->PutCellCaption(h0,long(1),"Sales Representative"); var_Items->PutCellCaption(h0,long(2),"Seattle"); h0 = var_Items->AddItem("Andrew Fuller"); var_Items->PutCellCaption(h0,long(1),"Vice President, Sales"); var_Items->PutCellCaption(h0,long(2),"Tacoma"); var_Items->PutSelectItem(h0,VARIANT_TRUE); h0 = var_Items->AddItem("Janet Leverling"); var_Items->PutCellCaption(h0,long(1),"Sales Representative"); var_Items->PutCellCaption(h0,long(2),"Kirkland"); h0 = var_Items->AddItem("Margaret Peacock"); var_Items->PutCellCaption(h0,long(1),"Sales Representative"); var_Items->PutCellCaption(h0,long(2),"Redmond"); h0 = var_Items->AddItem("Steven Buchanan"); var_Items->PutCellCaption(h0,long(1),"Sales Manager"); var_Items->PutCellCaption(h0,long(2),"London"); h0 = var_Items->AddItem("Michael Suyama"); var_Items->PutCellCaption(h0,long(1),"Sales Representative"); var_Items->PutCellCaption(h0,long(2),"London"); h0 = var_Items->AddItem("Robert King"); var_Items->PutCellCaption(h0,long(1),"Sales Representative"); var_Items->PutCellCaption(h0,long(2),"London"); h0 = var_Items->AddItem("Laura Callahan"); var_Items->PutCellCaption(h0,long(1),"Inside Sales Coordinator"); var_Items->PutCellCaption(h0,long(2),"Seattle"); h0 = var_Items->AddItem("Anne Dodsworth"); var_Items->PutCellCaption(h0,long(1),"Sales Representative"); var_Items->PutCellCaption(h0,long(2),"London"); spTree1->EndUpdate();
430. How can I specify that the list should include any of the seqeunces in the pattern
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->BeginUpdate(); spTree1->PutColumnAutoResize(VARIANT_TRUE); spTree1->PutContinueColumnScroll(VARIANT_FALSE); spTree1->PutMarkSearchColumn(VARIANT_FALSE); spTree1->PutSearchColumnIndex(1); spTree1->PutFilterBarPromptVisible(VARIANT_TRUE); spTree1->PutFilterBarPromptType(EXTREELib::exFilterPromptContainsAny); spTree1->PutFilterBarPromptPattern(L"london seattle"); EXTREELib::IColumnsPtr var_Columns = spTree1->GetColumns(); ((EXTREELib::IColumnPtr)(var_Columns->Add(L"Name")))->PutWidth(96); ((EXTREELib::IColumnPtr)(var_Columns->Add(L"Title")))->PutWidth(96); var_Columns->Add(L"City"); EXTREELib::IItemsPtr var_Items = spTree1->GetItems(); long h0 = var_Items->AddItem("Nancy Davolio"); var_Items->PutCellCaption(h0,long(1),"Sales Representative"); var_Items->PutCellCaption(h0,long(2),"Seattle"); h0 = var_Items->AddItem("Andrew Fuller"); var_Items->PutCellCaption(h0,long(1),"Vice President, Sales"); var_Items->PutCellCaption(h0,long(2),"Tacoma"); var_Items->PutSelectItem(h0,VARIANT_TRUE); h0 = var_Items->AddItem("Janet Leverling"); var_Items->PutCellCaption(h0,long(1),"Sales Representative"); var_Items->PutCellCaption(h0,long(2),"Kirkland"); h0 = var_Items->AddItem("Margaret Peacock"); var_Items->PutCellCaption(h0,long(1),"Sales Representative"); var_Items->PutCellCaption(h0,long(2),"Redmond"); h0 = var_Items->AddItem("Steven Buchanan"); var_Items->PutCellCaption(h0,long(1),"Sales Manager"); var_Items->PutCellCaption(h0,long(2),"London"); h0 = var_Items->AddItem("Michael Suyama"); var_Items->PutCellCaption(h0,long(1),"Sales Representative"); var_Items->PutCellCaption(h0,long(2),"London"); h0 = var_Items->AddItem("Robert King"); var_Items->PutCellCaption(h0,long(1),"Sales Representative"); var_Items->PutCellCaption(h0,long(2),"London"); h0 = var_Items->AddItem("Laura Callahan"); var_Items->PutCellCaption(h0,long(1),"Inside Sales Coordinator"); var_Items->PutCellCaption(h0,long(2),"Seattle"); h0 = var_Items->AddItem("Anne Dodsworth"); var_Items->PutCellCaption(h0,long(1),"Sales Representative"); var_Items->PutCellCaption(h0,long(2),"London"); spTree1->EndUpdate();
429. How can I specify that all sequences in the filter pattern must be included in the list
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->BeginUpdate(); spTree1->PutColumnAutoResize(VARIANT_TRUE); spTree1->PutContinueColumnScroll(VARIANT_FALSE); spTree1->PutMarkSearchColumn(VARIANT_FALSE); spTree1->PutSearchColumnIndex(1); spTree1->PutFilterBarPromptVisible(VARIANT_TRUE); spTree1->PutFilterBarPromptType(EXTREELib::exFilterPromptContainsAll); spTree1->PutFilterBarPromptPattern(L"london manager"); EXTREELib::IColumnsPtr var_Columns = spTree1->GetColumns(); ((EXTREELib::IColumnPtr)(var_Columns->Add(L"Name")))->PutWidth(96); ((EXTREELib::IColumnPtr)(var_Columns->Add(L"Title")))->PutWidth(96); var_Columns->Add(L"City"); EXTREELib::IItemsPtr var_Items = spTree1->GetItems(); long h0 = var_Items->AddItem("Nancy Davolio"); var_Items->PutCellCaption(h0,long(1),"Sales Representative"); var_Items->PutCellCaption(h0,long(2),"Seattle"); h0 = var_Items->AddItem("Andrew Fuller"); var_Items->PutCellCaption(h0,long(1),"Vice President, Sales"); var_Items->PutCellCaption(h0,long(2),"Tacoma"); var_Items->PutSelectItem(h0,VARIANT_TRUE); h0 = var_Items->AddItem("Janet Leverling"); var_Items->PutCellCaption(h0,long(1),"Sales Representative"); var_Items->PutCellCaption(h0,long(2),"Kirkland"); h0 = var_Items->AddItem("Margaret Peacock"); var_Items->PutCellCaption(h0,long(1),"Sales Representative"); var_Items->PutCellCaption(h0,long(2),"Redmond"); h0 = var_Items->AddItem("Steven Buchanan"); var_Items->PutCellCaption(h0,long(1),"Sales Manager"); var_Items->PutCellCaption(h0,long(2),"London"); h0 = var_Items->AddItem("Michael Suyama"); var_Items->PutCellCaption(h0,long(1),"Sales Representative"); var_Items->PutCellCaption(h0,long(2),"London"); h0 = var_Items->AddItem("Robert King"); var_Items->PutCellCaption(h0,long(1),"Sales Representative"); var_Items->PutCellCaption(h0,long(2),"London"); h0 = var_Items->AddItem("Laura Callahan"); var_Items->PutCellCaption(h0,long(1),"Inside Sales Coordinator"); var_Items->PutCellCaption(h0,long(2),"Seattle"); h0 = var_Items->AddItem("Anne Dodsworth"); var_Items->PutCellCaption(h0,long(1),"Sales Representative"); var_Items->PutCellCaption(h0,long(2),"London"); spTree1->EndUpdate();
428. How do I change at runtime the filter prompt
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->BeginUpdate(); spTree1->PutColumnAutoResize(VARIANT_TRUE); spTree1->PutContinueColumnScroll(VARIANT_FALSE); spTree1->PutMarkSearchColumn(VARIANT_FALSE); spTree1->PutSearchColumnIndex(1); spTree1->PutFilterBarPromptVisible(VARIANT_TRUE); spTree1->PutFilterBarPromptPattern(L"london manager"); EXTREELib::IColumnsPtr var_Columns = spTree1->GetColumns(); ((EXTREELib::IColumnPtr)(var_Columns->Add(L"Name")))->PutWidth(96); ((EXTREELib::IColumnPtr)(var_Columns->Add(L"Title")))->PutWidth(96); var_Columns->Add(L"City"); EXTREELib::IItemsPtr var_Items = spTree1->GetItems(); long h0 = var_Items->AddItem("Nancy Davolio"); var_Items->PutCellCaption(h0,long(1),"Sales Representative"); var_Items->PutCellCaption(h0,long(2),"Seattle"); h0 = var_Items->AddItem("Andrew Fuller"); var_Items->PutCellCaption(h0,long(1),"Vice President, Sales"); var_Items->PutCellCaption(h0,long(2),"Tacoma"); var_Items->PutSelectItem(h0,VARIANT_TRUE); h0 = var_Items->AddItem("Janet Leverling"); var_Items->PutCellCaption(h0,long(1),"Sales Representative"); var_Items->PutCellCaption(h0,long(2),"Kirkland"); h0 = var_Items->AddItem("Margaret Peacock"); var_Items->PutCellCaption(h0,long(1),"Sales Representative"); var_Items->PutCellCaption(h0,long(2),"Redmond"); h0 = var_Items->AddItem("Steven Buchanan"); var_Items->PutCellCaption(h0,long(1),"Sales Manager"); var_Items->PutCellCaption(h0,long(2),"London"); h0 = var_Items->AddItem("Michael Suyama"); var_Items->PutCellCaption(h0,long(1),"Sales Representative"); var_Items->PutCellCaption(h0,long(2),"London"); h0 = var_Items->AddItem("Robert King"); var_Items->PutCellCaption(h0,long(1),"Sales Representative"); var_Items->PutCellCaption(h0,long(2),"London"); h0 = var_Items->AddItem("Laura Callahan"); var_Items->PutCellCaption(h0,long(1),"Inside Sales Coordinator"); var_Items->PutCellCaption(h0,long(2),"Seattle"); h0 = var_Items->AddItem("Anne Dodsworth"); var_Items->PutCellCaption(h0,long(1),"Sales Representative"); var_Items->PutCellCaption(h0,long(2),"London"); spTree1->EndUpdate();
427. How do I specify to filter only a single column when using the filter prompt
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->BeginUpdate(); spTree1->PutColumnAutoResize(VARIANT_TRUE); spTree1->PutContinueColumnScroll(VARIANT_FALSE); spTree1->PutMarkSearchColumn(VARIANT_FALSE); spTree1->PutSearchColumnIndex(1); spTree1->PutFilterBarPromptVisible(VARIANT_TRUE); spTree1->PutFilterBarPromptColumns("2,3"); spTree1->PutFilterBarPromptPattern(L"london"); EXTREELib::IColumnsPtr var_Columns = spTree1->GetColumns(); ((EXTREELib::IColumnPtr)(var_Columns->Add(L"Name")))->PutWidth(96); ((EXTREELib::IColumnPtr)(var_Columns->Add(L"Title")))->PutWidth(96); var_Columns->Add(L"City"); EXTREELib::IItemsPtr var_Items = spTree1->GetItems(); long h0 = var_Items->AddItem("Nancy Davolio"); var_Items->PutCellCaption(h0,long(1),"Sales Representative"); var_Items->PutCellCaption(h0,long(2),"Seattle"); h0 = var_Items->AddItem("Andrew Fuller"); var_Items->PutCellCaption(h0,long(1),"Vice President, Sales"); var_Items->PutCellCaption(h0,long(2),"Tacoma"); var_Items->PutSelectItem(h0,VARIANT_TRUE); h0 = var_Items->AddItem("Janet Leverling"); var_Items->PutCellCaption(h0,long(1),"Sales Representative"); var_Items->PutCellCaption(h0,long(2),"Kirkland"); h0 = var_Items->AddItem("Margaret Peacock"); var_Items->PutCellCaption(h0,long(1),"Sales Representative"); var_Items->PutCellCaption(h0,long(2),"Redmond"); h0 = var_Items->AddItem("Steven Buchanan"); var_Items->PutCellCaption(h0,long(1),"Sales Manager"); var_Items->PutCellCaption(h0,long(2),"London"); h0 = var_Items->AddItem("Michael Suyama"); var_Items->PutCellCaption(h0,long(1),"Sales Representative"); var_Items->PutCellCaption(h0,long(2),"London"); h0 = var_Items->AddItem("Robert King"); var_Items->PutCellCaption(h0,long(1),"Sales Representative"); var_Items->PutCellCaption(h0,long(2),"London"); h0 = var_Items->AddItem("Laura Callahan"); var_Items->PutCellCaption(h0,long(1),"Inside Sales Coordinator"); var_Items->PutCellCaption(h0,long(2),"Seattle"); h0 = var_Items->AddItem("Anne Dodsworth"); var_Items->PutCellCaption(h0,long(1),"Sales Representative"); var_Items->PutCellCaption(h0,long(2),"London"); spTree1->EndUpdate();
426. How do I change the prompt or the caption being displayed in the filter bar
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->BeginUpdate(); spTree1->PutColumnAutoResize(VARIANT_TRUE); spTree1->PutContinueColumnScroll(VARIANT_FALSE); spTree1->PutMarkSearchColumn(VARIANT_FALSE); spTree1->PutSearchColumnIndex(1); spTree1->PutFilterBarPromptVisible(VARIANT_TRUE); spTree1->PutFilterBarPrompt(L"changed"); EXTREELib::IColumnsPtr var_Columns = spTree1->GetColumns(); ((EXTREELib::IColumnPtr)(var_Columns->Add(L"Name")))->PutWidth(96); ((EXTREELib::IColumnPtr)(var_Columns->Add(L"Title")))->PutWidth(96); var_Columns->Add(L"City"); spTree1->EndUpdate();
425. How do I enable the filter prompt feature
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->BeginUpdate(); spTree1->PutColumnAutoResize(VARIANT_TRUE); spTree1->PutContinueColumnScroll(VARIANT_FALSE); spTree1->PutMarkSearchColumn(VARIANT_FALSE); spTree1->PutSearchColumnIndex(1); spTree1->PutFilterBarPromptVisible(VARIANT_TRUE); EXTREELib::IColumnsPtr var_Columns = spTree1->GetColumns(); ((EXTREELib::IColumnPtr)(var_Columns->Add(L"Name")))->PutWidth(96); ((EXTREELib::IColumnPtr)(var_Columns->Add(L"Title")))->PutWidth(96); var_Columns->Add(L"City"); EXTREELib::IItemsPtr var_Items = spTree1->GetItems(); long h0 = var_Items->AddItem("Nancy Davolio"); var_Items->PutCellCaption(h0,long(1),"Sales Representative"); var_Items->PutCellCaption(h0,long(2),"Seattle"); h0 = var_Items->AddItem("Andrew Fuller"); var_Items->PutCellCaption(h0,long(1),"Vice President, Sales"); var_Items->PutCellCaption(h0,long(2),"Tacoma"); var_Items->PutSelectItem(h0,VARIANT_TRUE); h0 = var_Items->AddItem("Janet Leverling"); var_Items->PutCellCaption(h0,long(1),"Sales Representative"); var_Items->PutCellCaption(h0,long(2),"Kirkland"); h0 = var_Items->AddItem("Margaret Peacock"); var_Items->PutCellCaption(h0,long(1),"Sales Representative"); var_Items->PutCellCaption(h0,long(2),"Redmond"); h0 = var_Items->AddItem("Steven Buchanan"); var_Items->PutCellCaption(h0,long(1),"Sales Manager"); var_Items->PutCellCaption(h0,long(2),"London"); h0 = var_Items->AddItem("Michael Suyama"); var_Items->PutCellCaption(h0,long(1),"Sales Representative"); var_Items->PutCellCaption(h0,long(2),"London"); h0 = var_Items->AddItem("Robert King"); var_Items->PutCellCaption(h0,long(1),"Sales Representative"); var_Items->PutCellCaption(h0,long(2),"London"); h0 = var_Items->AddItem("Laura Callahan"); var_Items->PutCellCaption(h0,long(1),"Inside Sales Coordinator"); var_Items->PutCellCaption(h0,long(2),"Seattle"); h0 = var_Items->AddItem("Anne Dodsworth"); var_Items->PutCellCaption(h0,long(1),"Sales Representative"); var_Items->PutCellCaption(h0,long(2),"London"); spTree1->EndUpdate();
424. I have an EBN file how can I apply different colors to it, so no need to create a new one
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->GetVisualAppearance()->Add(1,"c:\\exontrol\\images\\normal.ebn"); spTree1->PutSelBackColor(spTree1->GetBackColor()); spTree1->PutSelForeColor(spTree1->GetForeColor()); spTree1->PutHasLines(EXTREELib::exNoLine); spTree1->GetColumns()->Add(L"Default"); EXTREELib::IItemsPtr var_Items = spTree1->GetItems(); long h = var_Items->AddItem("Root"); long hC = var_Items->InsertItem(h,long(0),"Default"); var_Items->PutItemBackColor(hC,0x1000000); var_Items->PutItemHeight(var_Items->InsertItem(h,long(0),""),6); hC = var_Items->InsertItem(h,long(0),"Light Green"); var_Items->PutItemBackColor(hC,0x100ff00); var_Items->PutItemHeight(var_Items->InsertItem(h,long(0),""),6); hC = var_Items->InsertItem(h,long(0),"Dark Green"); var_Items->PutItemBackColor(hC,0x1007f00); var_Items->PutItemHeight(var_Items->InsertItem(h,long(0),""),6); hC = var_Items->InsertItem(h,long(0),"Magenta"); var_Items->PutItemBackColor(hC,0x1ff7fff); var_Items->PutItemHeight(var_Items->InsertItem(h,long(0),""),6); hC = var_Items->InsertItem(h,long(0),"Yellow"); var_Items->PutItemBackColor(hC,0x17fffff); var_Items->PutItemHeight(var_Items->InsertItem(h,long(0),""),6); var_Items->PutExpandItem(h,VARIANT_TRUE);
423. How can I change the foreground color for a particular column
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); EXTREELib::IColumnsPtr var_Columns = spTree1->GetColumns(); var_Columns->Add(L"Column 1"); ((EXTREELib::IColumnPtr)(var_Columns->Add(L"Column 2")))->PutDef(EXTREELib::exHeaderForeColor,long(8439039)); var_Columns->Add(L"Column 3");
422. How can I change the background color for a particular column
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); EXTREELib::IColumnsPtr var_Columns = spTree1->GetColumns(); var_Columns->Add(L"Column 1"); ((EXTREELib::IColumnPtr)(var_Columns->Add(L"Column 2")))->PutDef(EXTREELib::exHeaderBackColor,long(8439039)); var_Columns->Add(L"Column 3");
421. How can I display the column using currency format and enlarge the font for certain values
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); EXTREELib::IColumnPtr var_Column = ((EXTREELib::IColumnPtr)(spTree1->GetColumns()->Add(L"Currency"))); var_Column->PutDef(EXTREELib::exCellCaptionFormat,long(1)); var_Column->PutFormatColumn(L"len(value) ? ((0:=dbl(value)) < 10 ? '<fgcolor=808080><font ;7>' : '<b>') + currency(=:0)"); EXTREELib::IItemsPtr var_Items = spTree1->GetItems(); var_Items->AddItem("1.23"); var_Items->AddItem("2.34"); var_Items->AddItem("9.94"); var_Items->AddItem("11.94"); var_Items->AddItem("1000");
420. How can I highlight only parts of the cells
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); EXTREELib::IColumnPtr var_Column = ((EXTREELib::IColumnPtr)(spTree1->GetColumns()->Add(L""))); var_Column->PutDef(EXTREELib::exCellCaptionFormat,long(1)); var_Column->PutFormatColumn(L"value replace 'hil' with '<fgcolor=FF0000><b>hil</b></fgcolor>'"); EXTREELib::IItemsPtr var_Items = spTree1->GetItems(); long h = var_Items->AddItem("Root"); var_Items->InsertItem(h,long(0),"Child 1"); var_Items->InsertItem(h,long(0),"Child 2"); var_Items->InsertItem(h,long(0),"Child 3"); var_Items->PutExpandItem(h,VARIANT_TRUE);
419. How can I get the number of occurrences of a specified string in the cell
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->GetColumns()->Add(L""); EXTREELib::IColumnPtr var_Column = ((EXTREELib::IColumnPtr)(spTree1->GetColumns()->Add(L"occurrences"))); var_Column->PutComputedField(L"lower(%0) count 'o'"); var_Column->PutFormatColumn(L"'contains ' + value + ' of \\'o\\' chars'"); EXTREELib::IItemsPtr var_Items = spTree1->GetItems(); long h = var_Items->AddItem("Root"); var_Items->InsertItem(h,long(0),"Child 1 oooof the root"); var_Items->InsertItem(h,long(0),"Child 2"); var_Items->InsertItem(h,long(0),"Child 3"); var_Items->PutExpandItem(h,VARIANT_TRUE);
418. How can I display dates in my format
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); EXTREELib::IColumnPtr var_Column = ((EXTREELib::IColumnPtr)(spTree1->GetColumns()->Add(L"Date"))); var_Column->PutDef(EXTREELib::exCellCaptionFormat,long(1)); var_Column->PutFormatColumn(_bstr_t("'<b>' + year(0:=date(value)) + '</b><fgcolor=808080><font ;6> (' + month(=:0) + ' - ' + day(=:0") + ") +')'"); EXTREELib::IItemsPtr var_Items = spTree1->GetItems(); var_Items->AddItem("1/21/2001"); var_Items->AddItem("2/22/2002"); var_Items->AddItem("3/13/2003"); var_Items->AddItem("4/24/2004");
417. How can I display dates in short format
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); ((EXTREELib::IColumnPtr)(spTree1->GetColumns()->Add(L"Date")))->PutFormatColumn(L"shortdate(value)"); EXTREELib::IItemsPtr var_Items = spTree1->GetItems(); var_Items->AddItem("1/1/2001"); var_Items->AddItem("2/2/2002"); var_Items->AddItem("3/3/2003"); var_Items->AddItem("4/4/2004");
416. How can I display dates in long format
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); ((EXTREELib::IColumnPtr)(spTree1->GetColumns()->Add(L"Date")))->PutFormatColumn(L"longdate(value)"); EXTREELib::IItemsPtr var_Items = spTree1->GetItems(); var_Items->AddItem("1/1/2001"); var_Items->AddItem("2/2/2002"); var_Items->AddItem("3/3/2003"); var_Items->AddItem("4/4/2004");
415. How can I display only the right part of the cell
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->GetColumns()->Add(L""); EXTREELib::IColumnPtr var_Column = ((EXTREELib::IColumnPtr)(spTree1->GetColumns()->Add(L"Right"))); var_Column->PutComputedField(L"%0 right 2"); var_Column->PutFormatColumn(L"'\"' + value + '\"'"); EXTREELib::IItemsPtr var_Items = spTree1->GetItems(); long h = var_Items->AddItem("Root"); var_Items->InsertItem(h,long(0),"Child 1"); var_Items->InsertItem(h,long(0),"Child 2"); var_Items->InsertItem(h,long(0),"SChild 3"); var_Items->PutExpandItem(h,VARIANT_TRUE);
414. How can I display only the left part of the cell
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->GetColumns()->Add(L""); ((EXTREELib::IColumnPtr)(spTree1->GetColumns()->Add(L"Left")))->PutComputedField(L"%0 left 2"); EXTREELib::IItemsPtr var_Items = spTree1->GetItems(); long h = var_Items->AddItem("Root"); var_Items->InsertItem(h,long(0),"Child 1"); var_Items->InsertItem(h,long(0),"Child 2"); var_Items->InsertItem(h,long(0),"SChild 3"); var_Items->PutExpandItem(h,VARIANT_TRUE);
413. How can I display true or false instead 0 and -1
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); ((EXTREELib::IColumnPtr)(spTree1->GetColumns()->Add(L"Boolean")))->PutFormatColumn(L"value != 0 ? 'true' : 'false'"); EXTREELib::IItemsPtr var_Items = spTree1->GetItems(); var_Items->AddItem(VARIANT_TRUE); var_Items->AddItem(VARIANT_FALSE); var_Items->AddItem(VARIANT_TRUE); var_Items->AddItem(long(0)); var_Items->AddItem(long(1));
412. How can I display icons or images instead numbers
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->Images(_bstr_t("gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0") + "/oFBoVDolFo1HpFJpVLplNp1PqFRqVTqlVq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1" + "/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m0ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qO" + "x3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/y" + "NAOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA="); EXTREELib::IColumnPtr var_Column = ((EXTREELib::IColumnPtr)(spTree1->GetColumns()->Add(L"Icons"))); var_Column->PutDef(EXTREELib::exCellCaptionFormat,long(1)); var_Column->PutFormatColumn(L"'The cell displays the icon <img>'+value+'</img> instead ' + value"); EXTREELib::IItemsPtr var_Items = spTree1->GetItems(); var_Items->AddItem(long(1)); var_Items->AddItem(long(2)); var_Items->AddItem(long(3));
411. How can I display the column using currency
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); ((EXTREELib::IColumnPtr)(spTree1->GetColumns()->Add(L"Currency")))->PutFormatColumn(L"currency(dbl(value))"); EXTREELib::IItemsPtr var_Items = spTree1->GetItems(); var_Items->AddItem("1.23"); var_Items->AddItem("2.34"); var_Items->AddItem("0"); var_Items->AddItem(long(5)); var_Items->AddItem("10000.99");
410. How can I display the currency only for not empty cells
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->GetColumns()->Add(L"Number"); ((EXTREELib::IColumnPtr)(spTree1->GetColumns()->Add(L"Currency")))->PutComputedField(L"len(%0) ? currency(dbl(%0)) : ''"); EXTREELib::IItemsPtr var_Items = spTree1->GetItems(); var_Items->AddItem("1.23"); var_Items->AddItem("2.34"); var_Items->AddItem("0"); var_Items->PutItemBackColor(var_Items->AddItem(vtMissing),RGB(255,128,128)); var_Items->AddItem("10000.99");
409. Is there a function to display the number of days between two date including the number of hours
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); ((EXTREELib::IColumnPtr)(spTree1->GetColumns()->Add(L"Start")))->PutWidth(32); spTree1->GetColumns()->Add(L"End"); ((EXTREELib::IColumnPtr)(spTree1->GetColumns()->Add(L"Duration")))->PutComputedField(_bstr_t("2:=((1:=int(0:= date(%1)-date(%0))) = 0 ? '' : str(=:1) + ' day(s)') + ( 3:=round(24*(=:0-floor") + "(=:0))) ? (len(=:2) ? ' and ' : '') + =:3 + ' hour(s)' : '' )"); EXTREELib::IItemsPtr var_Items = spTree1->GetItems(); long h = var_Items->AddItem("1/11/2001"); var_Items->PutCellCaption(h,long(1),"1/14/2001"); h = var_Items->AddItem("2/22/2002 12:00:00 PM"); var_Items->PutCellCaption(h,long(1),"3/14/2002 1:00:00 PM"); h = var_Items->AddItem("3/13/2003"); var_Items->PutCellCaption(h,long(1),"4/11/2003 11:00:00 AM");
408. Is there a function to display the number of days between two date including the number of hours
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->GetColumns()->Add(L"Start"); spTree1->GetColumns()->Add(L"End"); ((EXTREELib::IColumnPtr)(spTree1->GetColumns()->Add(L"Duration")))->PutComputedField(_bstr_t("\"D \" + int(date(%1)-date(%0)) + \" H \" + round(24*(date(%1)-date(%0) - floor(date(%1)-date(%") + "0))))"); EXTREELib::IItemsPtr var_Items = spTree1->GetItems(); long h = var_Items->AddItem("1/11/2001"); var_Items->PutCellCaption(h,long(1),"1/14/2001 11:00:00 PM"); h = var_Items->AddItem("2/22/2002 12:00:00 PM"); var_Items->PutCellCaption(h,long(1),"3/14/2002 1:00:00 PM"); h = var_Items->AddItem("3/13/2003"); var_Items->PutCellCaption(h,long(1),"4/11/2003 11:00:00 AM");
407. How can I display the number of days between two dates
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->GetColumns()->Add(L"Start"); spTree1->GetColumns()->Add(L"End"); ((EXTREELib::IColumnPtr)(spTree1->GetColumns()->Add(L"Duration")))->PutComputedField(L"(date(%1)-date(%0)) + ' days'"); EXTREELib::IItemsPtr var_Items = spTree1->GetItems(); long h = var_Items->AddItem("1/11/2001"); var_Items->PutCellCaption(h,long(1),"1/14/2001"); h = var_Items->AddItem("2/22/2002"); var_Items->PutCellCaption(h,long(1),"3/14/2002"); h = var_Items->AddItem("3/13/2003"); var_Items->PutCellCaption(h,long(1),"4/11/2003");
406. How can I get second part of the date
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->GetColumns()->Add(L"Date"); ((EXTREELib::IColumnPtr)(spTree1->GetColumns()->Add(L"Second")))->PutComputedField(L"sec(date(%0))"); EXTREELib::IItemsPtr var_Items = spTree1->GetItems(); var_Items->AddItem("1/11/2001 10:10:00 AM"); var_Items->AddItem("2/22/2002 11:01:22 AM"); var_Items->AddItem("3/13/2003 12:23:01 PM"); var_Items->AddItem("4/14/2004 1:11:59 PM");
405. How can I get minute part of the date
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->GetColumns()->Add(L"Date"); ((EXTREELib::IColumnPtr)(spTree1->GetColumns()->Add(L"Minute")))->PutComputedField(L"min(date(%0))"); EXTREELib::IItemsPtr var_Items = spTree1->GetItems(); var_Items->AddItem("1/11/2001 10:10:00 AM"); var_Items->AddItem("2/22/2002 11:01:00 AM"); var_Items->AddItem("3/13/2003 12:23:00 PM"); var_Items->AddItem("4/14/2004 1:11:00 PM");
404. How can I check the hour part only so I know it was afternoon
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->GetConditionalFormats()->Add(L"hour(%0)>=12",vtMissing)->PutBold(VARIANT_TRUE); spTree1->GetColumns()->Add(L"Date"); ((EXTREELib::IColumnPtr)(spTree1->GetColumns()->Add(L"Hour")))->PutComputedField(L"hour(%0)"); EXTREELib::IItemsPtr var_Items = spTree1->GetItems(); var_Items->AddItem("1/11/2001 10:00:00 AM"); var_Items->AddItem("2/22/2002 11:00:00 AM"); var_Items->AddItem("3/13/2003 12:00:00 PM"); var_Items->AddItem("4/14/2004 1:00:00 PM");
403. What about a function to get the day in the week, or days since Sunday
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->GetColumns()->Add(L"Date"); ((EXTREELib::IColumnPtr)(spTree1->GetColumns()->Add(L"WeekDay")))->PutComputedField(L"weekday(%0)"); EXTREELib::IItemsPtr var_Items = spTree1->GetItems(); var_Items->AddItem("1/11/2001 10:00:00 AM"); var_Items->AddItem("2/22/2002 11:00:00 AM"); var_Items->AddItem("3/13/2003 12:00:00 PM"); var_Items->AddItem("4/14/2004 1:00:00 PM");
402. Is there any function to get the day of the year or number of days since January 1st
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->GetColumns()->Add(L"Date"); ((EXTREELib::IColumnPtr)(spTree1->GetColumns()->Add(L"Day since January 1st")))->PutComputedField(L"yearday(%0)"); EXTREELib::IItemsPtr var_Items = spTree1->GetItems(); var_Items->AddItem("1/11/2001 10:00:00 AM"); var_Items->AddItem("2/22/2002 11:00:00 AM"); var_Items->AddItem("3/13/2003 12:00:00 PM"); var_Items->AddItem("4/14/2004 1:00:00 PM");
401. How can I display only the day of the date
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->GetColumns()->Add(L"Date"); ((EXTREELib::IColumnPtr)(spTree1->GetColumns()->Add(L"Day")))->PutComputedField(L"day(%0)"); EXTREELib::IItemsPtr var_Items = spTree1->GetItems(); var_Items->AddItem("1/11/2001 10:00:00 AM"); var_Items->AddItem("2/22/2002 11:00:00 AM"); var_Items->AddItem("3/13/2003 12:00:00 PM"); var_Items->AddItem("4/14/2004 1:00:00 PM");
400. How can I display only the month of the date
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->GetColumns()->Add(L"Date"); ((EXTREELib::IColumnPtr)(spTree1->GetColumns()->Add(L"Month")))->PutComputedField(L"month(%0)"); EXTREELib::IItemsPtr var_Items = spTree1->GetItems(); var_Items->AddItem("1/1/2001 10:00:00 AM"); var_Items->AddItem("2/2/2002 11:00:00 AM"); var_Items->AddItem("3/3/2003 12:00:00 PM"); var_Items->AddItem("4/4/2004 1:00:00 PM");
399. How can I get only the year part from a date expression
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->GetColumns()->Add(L"Date"); ((EXTREELib::IColumnPtr)(spTree1->GetColumns()->Add(L"Year")))->PutComputedField(L"year(%0)"); EXTREELib::IItemsPtr var_Items = spTree1->GetItems(); var_Items->AddItem("1/1/2001 10:00:00 AM"); var_Items->AddItem("2/2/2002 11:00:00 AM"); var_Items->AddItem("3/3/2003 12:00:00 PM"); var_Items->AddItem("4/4/2004 1:00:00 PM");
398. Can I convert the expression to date
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->GetColumns()->Add(L"Number"); ((EXTREELib::IColumnPtr)(spTree1->GetColumns()->Add(L"Date")))->PutComputedField(L"date(dbl(%0))"); EXTREELib::IItemsPtr var_Items = spTree1->GetItems(); var_Items->AddItem("-1.98"); var_Items->AddItem("30000.99"); var_Items->AddItem("3561.23"); var_Items->AddItem("1232.34");
397. Can I convert the expression to a number, double or float
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->GetColumns()->Add(L"Number"); ((EXTREELib::IColumnPtr)(spTree1->GetColumns()->Add(L"Number + 2")))->PutComputedField(L"dbl(%0)+2"); EXTREELib::IItemsPtr var_Items = spTree1->GetItems(); var_Items->AddItem("-1.98"); var_Items->AddItem("0.99"); var_Items->AddItem("1.23"); var_Items->AddItem("2.34");
396. How can I display dates in long format
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->GetColumns()->Add(L"Date"); ((EXTREELib::IColumnPtr)(spTree1->GetColumns()->Add(L"LongFormat")))->PutComputedField(L"longdate(%0)"); EXTREELib::IItemsPtr var_Items = spTree1->GetItems(); var_Items->AddItem("1/1/2001 10:00:00 AM"); var_Items->AddItem("2/2/2002 11:00:00 AM"); var_Items->AddItem("3/3/2003 12:00:00 PM"); var_Items->AddItem("4/4/2004 1:00:00 PM");
395. How can I display dates in short format
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->GetColumns()->Add(L"Date"); ((EXTREELib::IColumnPtr)(spTree1->GetColumns()->Add(L"ShortFormat")))->PutComputedField(L"shortdate(%0)"); EXTREELib::IItemsPtr var_Items = spTree1->GetItems(); var_Items->AddItem("1/1/2001 10:00:00 AM"); var_Items->AddItem("2/2/2002 11:00:00 AM"); var_Items->AddItem("3/3/2003 12:00:00 PM"); var_Items->AddItem("4/4/2004 1:00:00 PM");
394. How can I display the time only of a date expression
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->GetColumns()->Add(L"Date"); ((EXTREELib::IColumnPtr)(spTree1->GetColumns()->Add(L"Time")))->PutComputedField(L"'time is:' + time(date(%0))"); EXTREELib::IItemsPtr var_Items = spTree1->GetItems(); var_Items->AddItem("1/1/2001 10:00:00 AM"); var_Items->AddItem("2/2/2002 11:00:00 AM"); var_Items->AddItem("3/3/2003 12:00:00 PM"); var_Items->AddItem("4/4/2004 1:00:00 PM");
393. Is there any function to display currencies, or money formatted as in the control panel
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->GetColumns()->Add(L"Number"); ((EXTREELib::IColumnPtr)(spTree1->GetColumns()->Add(L"Currency")))->PutComputedField(L"currency(dbl(%0))"); EXTREELib::IItemsPtr var_Items = spTree1->GetItems(); var_Items->AddItem("1.23"); var_Items->AddItem("2.34"); var_Items->AddItem("10000.99");
392. How can I convert the expression to a string so I can look into the date string expression for month's name
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->GetColumns()->Add(L"Number"); ((EXTREELib::IColumnPtr)(spTree1->GetColumns()->Add(L"Str")))->PutComputedField(L"str(%0) + ' AA'"); EXTREELib::IItemsPtr var_Items = spTree1->GetItems(); var_Items->AddItem("-1.98"); var_Items->AddItem("0.99"); var_Items->AddItem("1.23"); var_Items->AddItem("2.34");
391. Can I display the absolute value or positive part of the number
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->GetColumns()->Add(L"Number"); ((EXTREELib::IColumnPtr)(spTree1->GetColumns()->Add(L"Abs")))->PutComputedField(L"abs(%0)"); EXTREELib::IItemsPtr var_Items = spTree1->GetItems(); var_Items->AddItem("-1.98"); var_Items->AddItem("0.99"); var_Items->AddItem("1.23"); var_Items->AddItem("2.34");
390. Is there any function to get largest number with no fraction part that is not greater than the value
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->GetColumns()->Add(L"Number"); ((EXTREELib::IColumnPtr)(spTree1->GetColumns()->Add(L"Floor")))->PutComputedField(L"floor(%0)"); EXTREELib::IItemsPtr var_Items = spTree1->GetItems(); var_Items->AddItem("-1.98"); var_Items->AddItem("0.99"); var_Items->AddItem("1.23"); var_Items->AddItem("2.34");
389. Is there any function to round the values base on the .5 value
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->GetColumns()->Add(L"Number"); ((EXTREELib::IColumnPtr)(spTree1->GetColumns()->Add(L"Round")))->PutComputedField(L"round(%0)"); EXTREELib::IItemsPtr var_Items = spTree1->GetItems(); var_Items->AddItem("-1.98"); var_Items->AddItem("0.99"); var_Items->AddItem("1.23"); var_Items->AddItem("2.34");
388. How can I get or display the integer part of the cell
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->GetColumns()->Add(L"Number"); ((EXTREELib::IColumnPtr)(spTree1->GetColumns()->Add(L"Int")))->PutComputedField(L"int(%0)"); EXTREELib::IItemsPtr var_Items = spTree1->GetItems(); var_Items->AddItem("-1.98"); var_Items->AddItem("0.99"); var_Items->AddItem("1.23"); var_Items->AddItem("2.34");
387. How can I display names as proper ( first leter of the word must be in uppercase, and the rest in lowercase )
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); ((EXTREELib::IColumnPtr)(spTree1->GetColumns()->Add(L"")))->PutComputedField(L"proper(%0)"); EXTREELib::IItemsPtr var_Items = spTree1->GetItems(); long h = var_Items->AddItem("root"); var_Items->InsertItem(h,long(0),"child child"); var_Items->InsertItem(h,long(0),"child child"); var_Items->InsertItem(h,long(0),"child child"); var_Items->PutExpandItem(h,VARIANT_TRUE);
386. Is there any option to display cells in uppercase
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); ((EXTREELib::IColumnPtr)(spTree1->GetColumns()->Add(L"")))->PutComputedField(L"upper(%0)"); EXTREELib::IItemsPtr var_Items = spTree1->GetItems(); long h = var_Items->AddItem("Root"); var_Items->InsertItem(h,long(0),"Child 1"); var_Items->InsertItem(h,long(0),"Child 2"); var_Items->InsertItem(h,long(0),"Chld 3"); var_Items->PutExpandItem(h,VARIANT_TRUE);
385. Is there any option to display cells in lowercase
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); ((EXTREELib::IColumnPtr)(spTree1->GetColumns()->Add(L"")))->PutComputedField(L"lower(%0)"); EXTREELib::IItemsPtr var_Items = spTree1->GetItems(); long h = var_Items->AddItem("Root"); var_Items->InsertItem(h,long(0),"Child 1"); var_Items->InsertItem(h,long(0),"Child 2"); var_Items->InsertItem(h,long(0),"Chld 3"); var_Items->PutExpandItem(h,VARIANT_TRUE);
384. How can I mark the cells that has a specified type, ie strings only
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->GetConditionalFormats()->Add(L"type(%0) = 8",vtMissing)->PutForeColor(RGB(255,0,0)); spTree1->GetColumns()->Add(L""); EXTREELib::IItemsPtr var_Items = spTree1->GetItems(); long h = var_Items->AddItem("Root"); var_Items->InsertItem(h,long(0),"Child 1"); var_Items->InsertItem(h,long(0),long(2)); var_Items->InsertItem(h,long(0),"Chld 3"); var_Items->PutExpandItem(h,VARIANT_TRUE);
383. How can I bold the items that contains data or those who displays empty strings
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->GetConditionalFormats()->Add(L"not len(%1)=0",vtMissing)->PutBold(VARIANT_TRUE); spTree1->GetColumns()->Add(L"C1"); spTree1->GetColumns()->Add(L"C2"); EXTREELib::IItemsPtr var_Items = spTree1->GetItems(); long h = var_Items->AddItem("Root"); var_Items->InsertItem(h,long(0),"Child 1"); long hC = var_Items->InsertItem(h,long(0),"Child 2"); var_Items->PutCellCaption(hC,long(1),"1"); var_Items->InsertItem(h,long(0),"Child 3"); var_Items->PutExpandItem(h,VARIANT_TRUE);
382. Can I change the background color for items or cells that contains a specified string
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->GetConditionalFormats()->Add(L"%0 contains 'hi'",vtMissing)->PutBackColor(RGB(255,0,0)); spTree1->GetColumns()->Add(L""); EXTREELib::IItemsPtr var_Items = spTree1->GetItems(); long h = var_Items->AddItem("Root"); var_Items->InsertItem(h,long(0),"Child 1"); var_Items->InsertItem(h,long(0),"Child 2"); var_Items->InsertItem(h,long(0),"Chld 3"); var_Items->PutExpandItem(h,VARIANT_TRUE);
381. Is there any option to change the fore color for cells or items that ends with a specified string
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->GetConditionalFormats()->Add(L"%0 endwith '22'",vtMissing)->PutForeColor(RGB(255,0,0)); spTree1->GetColumns()->Add(L""); EXTREELib::IItemsPtr var_Items = spTree1->GetItems(); long h = var_Items->AddItem("Root"); var_Items->InsertItem(h,long(0),"Child 1"); var_Items->InsertItem(h,long(0),"Child 1.22"); var_Items->InsertItem(h,long(0),"Child 2.22"); var_Items->PutExpandItem(h,VARIANT_TRUE);
380. How can I highlight the cells or items that starts with a specified string
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->GetConditionalFormats()->Add(L"%0 startwith 'C'",vtMissing)->PutUnderline(VARIANT_TRUE); spTree1->GetColumns()->Add(L""); EXTREELib::IItemsPtr var_Items = spTree1->GetItems(); long h = var_Items->AddItem("Root"); var_Items->InsertItem(h,long(0),"Child 1"); var_Items->InsertItem(h,long(0),"Child 2"); var_Items->InsertItem(h,long(0),"SChild 3"); var_Items->PutExpandItem(h,VARIANT_TRUE);
379. How can I change the background color or the visual appearance using ebn for a particular column
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->GetVisualAppearance()->Add(1,"c:\\exontrol\\images\\normal.ebn"); EXTREELib::IColumnsPtr var_Columns = spTree1->GetColumns(); var_Columns->Add(L"Column 1"); ((EXTREELib::IColumnPtr)(var_Columns->Add(L"Column 2")))->PutDef(EXTREELib::exHeaderBackColor,long(16777216)); ((EXTREELib::IColumnPtr)(var_Columns->Add(L"Column 3")))->PutDef(EXTREELib::exHeaderBackColor,long(16777471)); var_Columns->Add(L"Column 4");
378. How can I change the background color for a particular column
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); EXTREELib::IColumnsPtr var_Columns = spTree1->GetColumns(); var_Columns->Add(L"Column 1"); ((EXTREELib::IColumnPtr)(var_Columns->Add(L"Column 2")))->PutDef(EXTREELib::exHeaderBackColor,long(8439039)); var_Columns->Add(L"Column 3");
377. How can I display the column's header using multiple lines
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->PutHeaderHeight(128); spTree1->PutHeaderSingleLine(VARIANT_FALSE); ((EXTREELib::IColumnPtr)(spTree1->GetColumns()->Add(L"This is just a column that should break the header.")))->PutWidth(32); spTree1->GetColumns()->Add(L"This is just another column that should break the header.");
376. How can include the values in the inner cells in the drop down filter window
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->PutDrawGridLines(EXTREELib::exRowLines); spTree1->GetVisualAppearance()->Add(1,"c:\\exontrol\\images\\normal.ebn"); spTree1->PutDescription(EXTREELib::exFilterBarBlanks,L""); spTree1->PutDescription(EXTREELib::exFilterBarNonBlanks,L""); EXTREELib::IColumnPtr var_Column = ((EXTREELib::IColumnPtr)(spTree1->GetColumns()->Add(L"Single Column"))); var_Column->PutHTMLCaption(L"Single column with <b>inner cells</b>"); var_Column->PutToolTip(L"Click the drop down filter button, and the filter list includes the inner cells values too."); var_Column->PutDisplayFilterButton(VARIANT_TRUE); var_Column->PutDisplayFilterPattern(VARIANT_FALSE); var_Column->PutFilterList(EXTREELib::exIncludeInnerCells); spTree1->PutShowFocusRect(VARIANT_FALSE); EXTREELib::IItemsPtr var_Items = spTree1->GetItems(); _variant_t s = var_Items->GetSplitCell(var_Items->AddItem("S 1.1"),long(0)); var_Items->PutCellCaption(long(0),s,"S 1.2"); var_Items->PutCellHAlignment(long(0),s,EXTREELib::CenterAlignment); var_Items->PutCellBackColor(long(0),s,0x1000000); var_Items->PutCellWidth(long(0),s,84); s = var_Items->GetSplitCell(var_Items->AddItem("S 2.1"),long(0)); var_Items->PutCellCaption(long(0),s,"S 2.2"); var_Items->PutCellHAlignment(long(0),s,EXTREELib::CenterAlignment); var_Items->PutCellWidth(long(0),s,84); s = var_Items->GetSplitCell(var_Items->AddItem("S 3.1"),long(0)); var_Items->PutCellCaption(long(0),s,"S 3.2"); var_Items->PutCellHAlignment(long(0),s,EXTREELib::CenterAlignment); var_Items->PutCellBackColor(long(0),s,0x1000000); var_Items->PutCellWidth(long(0),s,84);
375. How can I sort the value gets listed in the drop down filter window
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->PutLinesAtRoot(EXTREELib::exLinesAtRoot); spTree1->PutMarkSearchColumn(VARIANT_FALSE); spTree1->PutDescription(EXTREELib::exFilterBarAll,L""); spTree1->PutDescription(EXTREELib::exFilterBarBlanks,L""); spTree1->PutDescription(EXTREELib::exFilterBarNonBlanks,L""); EXTREELib::IColumnPtr var_Column = ((EXTREELib::IColumnPtr)(spTree1->GetColumns()->Add(L"P1"))); var_Column->PutDisplayFilterButton(VARIANT_TRUE); var_Column->PutDisplayFilterPattern(VARIANT_FALSE); var_Column->PutFilterList(EXTREELib::exSortItemsDesc); EXTREELib::IColumnPtr var_Column1 = ((EXTREELib::IColumnPtr)(spTree1->GetColumns()->Add(L"P2"))); var_Column1->PutDisplayFilterButton(VARIANT_TRUE); var_Column1->PutDisplayFilterPattern(VARIANT_FALSE); var_Column1->PutFilterList(EXTREELib::exSortItemsAsc); EXTREELib::IItemsPtr var_Items = spTree1->GetItems(); long h = var_Items->AddItem("Z3"); var_Items->PutCellCaption(h,long(1),"C"); var_Items->PutCellCaption(var_Items->InsertItem(h,long(0),"Z1"),long(1),"B"); var_Items->PutCellCaption(var_Items->InsertItem(h,long(0),"Z2"),long(1),"A"); var_Items->PutExpandItem(h,VARIANT_TRUE);
374. How can I align the text/caption on the scroll bar
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->PutScrollPartCaption(EXTREELib::exHScroll,EXTREELib::exLowerBackPart,L"left"); spTree1->PutScrollPartCaptionAlignment(EXTREELib::exHScroll,EXTREELib::exLowerBackPart,EXTREELib::LeftAlignment); spTree1->PutScrollPartCaption(EXTREELib::exHScroll,EXTREELib::exUpperBackPart,L"right"); spTree1->PutScrollPartCaptionAlignment(EXTREELib::exHScroll,EXTREELib::exUpperBackPart,EXTREELib::RightAlignment); spTree1->PutColumnAutoResize(VARIANT_FALSE); spTree1->GetColumns()->Add(L"1"); spTree1->GetColumns()->Add(L"2"); spTree1->GetColumns()->Add(L"3"); spTree1->GetColumns()->Add(L"4"); spTree1->GetColumns()->Add(L"5"); spTree1->GetColumns()->Add(L"6");
373. How do I select the next row/item
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->GetColumns()->Add(L"Column"); EXTREELib::IItemsPtr var_Items = spTree1->GetItems(); var_Items->AddItem("Item 1"); var_Items->AddItem("Item 2"); var_Items->AddItem("Item 3"); var_Items->PutSelectItem(var_Items->GetNextVisibleItem(var_Items->GetFocusItem()),VARIANT_TRUE);
372. How do I enable resizing ( changing the height ) the items at runtime
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->PutItemsAllowSizing(EXTREELib::exResizeItem); spTree1->PutDrawGridLines(EXTREELib::exHLines); spTree1->PutScrollBySingleLine(VARIANT_TRUE); spTree1->GetColumns()->Add(L"Column"); spTree1->GetItems()->AddItem("Item 1"); EXTREELib::IItemsPtr var_Items = spTree1->GetItems(); var_Items->PutItemHeight(var_Items->AddItem("Item 2"),48); spTree1->GetItems()->AddItem("Item 3"); spTree1->GetItems()->AddItem("Item 4");
371. How do I enable resizing all the items at runtime
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->PutItemsAllowSizing(EXTREELib::exResizeAllItems); spTree1->PutDrawGridLines(EXTREELib::exHLines); spTree1->GetColumns()->Add(L"Column"); spTree1->GetItems()->AddItem("Item 1"); EXTREELib::IItemsPtr var_Items = spTree1->GetItems(); var_Items->PutItemHeight(var_Items->AddItem("Item 2"),48); spTree1->GetItems()->AddItem("Item 3");
370. How can I remove the filter
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); EXTREELib::IColumnPtr var_Column = ((EXTREELib::IColumnPtr)(spTree1->GetColumns()->Add(L"Column"))); var_Column->PutDisplayFilterButton(VARIANT_TRUE); var_Column->PutFilterType(EXTREELib::exBlanks); spTree1->ApplyFilter(); spTree1->ClearFilter();
369. How do I change the control's border, using your EBN files
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->GetVisualAppearance()->Add(1,"c:\\exontrol\\images\\normal.ebn"); spTree1->PutAppearance(EXTREELib::AppearanceEnum(0x1000000));
368. Can I change the default border of the tooltip, using your EBN files
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->PutToolTipDelay(1); spTree1->PutToolTipWidth(364); spTree1->GetVisualAppearance()->Add(1,"c:\\exontrol\\images\\normal.ebn"); spTree1->PutBackground(EXTREELib::exToolTipAppearance,0x1000000); ((EXTREELib::IColumnPtr)(spTree1->GetColumns()->Add(L"tootip")))->PutToolTip(L"this is a tooltip assigned to a column");
367. Can I change the background color for the tooltip
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->PutToolTipDelay(1); spTree1->PutToolTipWidth(364); spTree1->PutBackground(EXTREELib::exToolTipBackColor,RGB(255,0,0)); ((EXTREELib::IColumnPtr)(spTree1->GetColumns()->Add(L"tootip")))->PutToolTip(L"this is a tooltip assigned to a column");
366. Does the tooltip support HTML format
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->PutToolTipDelay(1); spTree1->PutToolTipWidth(364); ((EXTREELib::IColumnPtr)(spTree1->GetColumns()->Add(L"tootip")))->PutToolTip(_bstr_t("<font Tahoma;11>T</font>his is an HTML <b>tooltip</b> assigned to a <fgcolor=FF0000>column</fgc") + "olor>");
365. Can I change the forecolor for the tooltip
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->PutToolTipDelay(1); spTree1->PutToolTipWidth(364); spTree1->PutBackground(EXTREELib::exToolTipForeColor,RGB(255,0,0)); ((EXTREELib::IColumnPtr)(spTree1->GetColumns()->Add(L"tootip")))->PutToolTip(L"this is a tooltip assigned to a column");
364. Can I change the foreground color for the tooltip
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->PutToolTipDelay(1); spTree1->PutToolTipWidth(364); ((EXTREELib::IColumnPtr)(spTree1->GetColumns()->Add(L"tootip")))->PutToolTip(L"<fgcolor=FF0000>this is a tooltip assigned to a column</fgcolor>");
363. How can I merge cells
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->PutDrawGridLines(EXTREELib::exAllLines); spTree1->PutMarkSearchColumn(VARIANT_FALSE); spTree1->GetColumns()->Add(L"C1"); spTree1->GetColumns()->Add(L"C2"); spTree1->GetColumns()->Add(L"C3"); EXTREELib::IItemsPtr var_Items = spTree1->GetItems(); long h = var_Items->AddItem("this cell merges the first two columns"); var_Items->PutCellMerge(h,long(0),long(1)); h = var_Items->AddItem(vtMissing); var_Items->PutCellCaption(h,long(1),"this cell merges the last two columns"); var_Items->PutCellMerge(h,long(1),long(2)); h = var_Items->AddItem("this cell merges the all three columns"); var_Items->PutCellMerge(h,long(0),long(1)); var_Items->PutCellMerge(h,long(0),long(2)); h = var_Items->AddItem("this draws a divider item"); var_Items->PutItemDivider(h,0);
362. How can I merge cells
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->PutMarkSearchColumn(VARIANT_FALSE); spTree1->PutTreeColumnIndex(-1); spTree1->GetColumns()->Add(L"C1"); spTree1->GetColumns()->Add(L"C2"); EXTREELib::IItemsPtr var_Items = spTree1->GetItems(); long h = var_Items->AddItem("Cell 1"); var_Items->PutCellCaption(h,long(1),_bstr_t("This is bit of text that's shown on multiple lines. This is bit of text that's shown on multipl") + "e lines."); var_Items->PutCellSingleLine(h,long(1),VARIANT_FALSE); h = var_Items->AddItem("This is bit of text merges all cells in the item"); var_Items->PutItemDivider(h,0); var_Items->PutCellHAlignment(h,long(0),EXTREELib::CenterAlignment);
361. How can I specify the width for a splited cell
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->PutDrawGridLines(EXTREELib::exRowLines); spTree1->GetColumns()->Add(L"Single Column"); EXTREELib::IItemsPtr var_Items = spTree1->GetItems(); long h = var_Items->AddItem("Split 1"); _variant_t s = var_Items->GetSplitCell(h,long(0)); var_Items->PutCellWidth(long(0),s,64); var_Items->PutCellCaption(long(0),s,"Split 2"); _variant_t s1 = var_Items->GetSplitCell(long(0),s); var_Items->PutCellCaption(long(0),s1,"Split 3"); var_Items->PutCellWidth(long(0),s1,64);
360. How can I split a cell in three parts
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->PutDrawGridLines(EXTREELib::exRowLines); spTree1->GetColumns()->Add(L"Single Column"); EXTREELib::IItemsPtr var_Items = spTree1->GetItems(); long h = var_Items->AddItem("Split 1"); _variant_t s = var_Items->GetSplitCell(h,long(0)); var_Items->PutCellCaption(long(0),s,"Split 2"); _variant_t s1 = var_Items->GetSplitCell(long(0),s); var_Items->PutCellCaption(long(0),s1,"Split 3");
359. How can I add a button aligned to right
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->Images(_bstr_t("gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0") + "/oFBoVDolFo1HpFJpVLplNp1PqFRqVTqlVq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1" + "/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m0ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qO" + "x3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/y" + "NAOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA="); spTree1->GetColumns()->Add(L"Single Column"); spTree1->PutShowFocusRect(VARIANT_FALSE); EXTREELib::IItemsPtr var_Items = spTree1->GetItems(); var_Items->PutItemDivider(var_Items->AddItem("This is a bit of text being displayed on the entire item"),0); _variant_t s = var_Items->GetSplitCell(var_Items->AddItem("Split Cell 1.1"),long(0)); var_Items->PutCellCaption(long(0),s,"Split Cell <img>1</img>"); var_Items->PutCellCaptionFormat(long(0),s,EXTREELib::exHTML); var_Items->PutCellHAlignment(long(0),s,EXTREELib::CenterAlignment); var_Items->PutCellHasButton(long(0),s,VARIANT_TRUE); var_Items->PutCellWidth(long(0),s,84);
358. How can I split a cell
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->PutDrawGridLines(EXTREELib::exRowLines); spTree1->Images(_bstr_t("gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0") + "/oFBoVDolFo1HpFJpVLplNp1PqFRqVTqlVq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1" + "/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m0ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qO" + "x3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/y" + "NAOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA="); spTree1->GetVisualAppearance()->Add(1,"c:\\exontrol\\images\\normal.ebn"); spTree1->GetColumns()->Add(L"Single Column"); spTree1->PutShowFocusRect(VARIANT_FALSE); EXTREELib::IItemsPtr var_Items = spTree1->GetItems(); _variant_t s = var_Items->GetSplitCell(var_Items->AddItem("Split Cell 1.1"),long(0)); var_Items->PutCellCaption(long(0),s,"Split Cell <img>1</img>"); var_Items->PutCellCaptionFormat(long(0),s,EXTREELib::exHTML); var_Items->PutCellHAlignment(long(0),s,EXTREELib::CenterAlignment); var_Items->PutCellBackColor(long(0),s,0x1000000); var_Items->PutCellWidth(long(0),s,84);
357. Can I select an item giving its general position
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->GetColumns()->Add(L"Default"); EXTREELib::IItemsPtr var_Items = spTree1->GetItems(); long h = var_Items->AddItem("Root 1"); var_Items->InsertItem(h,long(0),"Child 1"); var_Items->InsertItem(h,long(0),"Child 2"); var_Items->PutExpandItem(h,VARIANT_TRUE); var_Items->PutSelectPos(long(1));
356. How can I change the color for separator / dividers items
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->PutGridLineColor(RGB(255,0,0)); spTree1->PutMarkSearchColumn(VARIANT_FALSE); spTree1->PutTreeColumnIndex(-1); spTree1->PutScrollBySingleLine(VARIANT_FALSE); spTree1->GetColumns()->Add(L"C1"); spTree1->GetColumns()->Add(L"C2"); EXTREELib::IItemsPtr var_Items = spTree1->GetItems(); long h = var_Items->AddItem("Cell 1"); var_Items->PutCellCaption(h,long(1),_bstr_t("This is bit of text that's shown on multiple lines. This is bit of text that's shown on multipl") + "e lines."); var_Items->PutCellSingleLine(h,long(1),VARIANT_FALSE); h = var_Items->AddItem(vtMissing); var_Items->PutItemDivider(h,0); var_Items->PutItemDividerLine(h,EXTREELib::DoubleDotLine); var_Items->PutItemDividerLineAlignment(h,EXTREELib::DividerCenter); var_Items->PutItemHeight(h,6); var_Items->PutSelectableItem(h,VARIANT_FALSE); h = var_Items->AddItem("Cell 2"); var_Items->PutCellCaption(h,long(1),_bstr_t("This is bit of text that's shown on multiple lines. This is bit of text that's shown on multipl") + "e lines."); var_Items->PutCellSingleLine(h,long(1),VARIANT_FALSE);
355. How can I add separator - dividers items
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->PutMarkSearchColumn(VARIANT_FALSE); spTree1->PutTreeColumnIndex(-1); spTree1->PutScrollBySingleLine(VARIANT_FALSE); spTree1->GetColumns()->Add(L"C1"); spTree1->GetColumns()->Add(L"C2"); EXTREELib::IItemsPtr var_Items = spTree1->GetItems(); long h = var_Items->AddItem("Cell 1"); var_Items->PutCellCaption(h,long(1),_bstr_t("This is bit of text that's shown on multiple lines. This is bit of text that's shown on multipl") + "e lines."); var_Items->PutCellSingleLine(h,long(1),VARIANT_FALSE); h = var_Items->AddItem(vtMissing); var_Items->PutItemDivider(h,0); var_Items->PutItemDividerLine(h,EXTREELib::DoubleDotLine); var_Items->PutItemDividerLineAlignment(h,EXTREELib::DividerCenter); var_Items->PutItemHeight(h,6); var_Items->PutSelectableItem(h,VARIANT_FALSE); h = var_Items->AddItem("Cell 2"); var_Items->PutCellCaption(h,long(1),_bstr_t("This is bit of text that's shown on multiple lines. This is bit of text that's shown on multipl") + "e lines."); var_Items->PutCellSingleLine(h,long(1),VARIANT_FALSE);
354. Can I change the style of the line being displayed by a divider item
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->PutMarkSearchColumn(VARIANT_FALSE); spTree1->PutTreeColumnIndex(-1); spTree1->PutScrollBySingleLine(VARIANT_FALSE); spTree1->GetColumns()->Add(L"C1"); spTree1->GetColumns()->Add(L"C2"); EXTREELib::IItemsPtr var_Items = spTree1->GetItems(); long h = var_Items->AddItem("Cell 1"); var_Items->PutCellCaption(h,long(1),_bstr_t("This is bit of text that's shown on multiple lines. This is bit of text that's shown on multipl") + "e lines."); var_Items->PutCellSingleLine(h,long(1),VARIANT_FALSE); h = var_Items->AddItem("This is bit of text that's displayed on the entire item, divider."); var_Items->PutItemDivider(h,0); var_Items->PutItemDividerLine(h,EXTREELib::DoubleDotLine); var_Items->PutCellHAlignment(h,long(0),EXTREELib::CenterAlignment); var_Items->PutItemHeight(h,24);
353. Can I remove the line being displayed by a divider item
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->PutMarkSearchColumn(VARIANT_FALSE); spTree1->PutTreeColumnIndex(-1); spTree1->GetColumns()->Add(L"C1"); spTree1->GetColumns()->Add(L"C2"); EXTREELib::IItemsPtr var_Items = spTree1->GetItems(); long h = var_Items->AddItem("Cell 1"); var_Items->PutCellCaption(h,long(1),_bstr_t("This is bit of text that's shown on multiple lines. This is bit of text that's shown on multipl") + "e lines."); var_Items->PutCellSingleLine(h,long(1),VARIANT_FALSE); h = var_Items->AddItem("This is bit of text that's displayed on the entire item, divider."); var_Items->PutItemDivider(h,0); var_Items->PutItemDividerLine(h,EXTREELib::EmptyLine); var_Items->PutCellHAlignment(h,long(0),EXTREELib::CenterAlignment);
352. How can I display a divider item, merging all cells
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->PutMarkSearchColumn(VARIANT_FALSE); spTree1->PutTreeColumnIndex(-1); spTree1->GetColumns()->Add(L"C1"); spTree1->GetColumns()->Add(L"C2"); EXTREELib::IItemsPtr var_Items = spTree1->GetItems(); long h = var_Items->AddItem("Cell 1"); var_Items->PutCellCaption(h,long(1),_bstr_t("This is bit of text that's shown on multiple lines. This is bit of text that's shown on multipl") + "e lines."); var_Items->PutCellSingleLine(h,long(1),VARIANT_FALSE); h = var_Items->AddItem("This is bit of text that's displayed on the entire item, divider."); var_Items->PutItemDivider(h,0); var_Items->PutCellHAlignment(h,long(0),EXTREELib::CenterAlignment);
351. How can I fix or lock items
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->GetColumns()->Add(L"Default"); EXTREELib::IItemsPtr var_Items = spTree1->GetItems(); var_Items->PutLockedItemCount(EXTREELib::TopAlignment,1); var_Items->PutCellCaption(var_Items->GetLockedItem(EXTREELib::TopAlignment,0),long(0),"This is a locked item, fixed to the top side of the control."); var_Items->PutItemBackColor(var_Items->GetLockedItem(EXTREELib::TopAlignment,0),RGB(196,196,186)); var_Items->PutLockedItemCount(EXTREELib::BottomAlignment,2); var_Items->PutCellCaption(var_Items->GetLockedItem(EXTREELib::BottomAlignment,0),long(0),"This is a locked item, fixed to the top side of the control."); var_Items->PutItemBackColor(var_Items->GetLockedItem(EXTREELib::BottomAlignment,0),RGB(196,196,186)); var_Items->PutCellCaption(var_Items->GetLockedItem(EXTREELib::BottomAlignment,1),long(0),"This is a locked item, fixed to the top side of the control."); var_Items->PutItemBackColor(var_Items->GetLockedItem(EXTREELib::BottomAlignment,1),RGB(186,186,186));
350. How can I fix or lock an item on the bottom side of the control
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->GetColumns()->Add(L"Default"); EXTREELib::IItemsPtr var_Items = spTree1->GetItems(); var_Items->PutLockedItemCount(EXTREELib::BottomAlignment,1); var_Items->PutCellCaption(var_Items->GetLockedItem(EXTREELib::BottomAlignment,0),long(0),"This is a locked item, fixed to the bottom side of the control."); long h = var_Items->AddItem("Root 1"); var_Items->InsertItem(h,long(0),"Child 1"); var_Items->InsertItem(h,long(0),"Child 2"); var_Items->PutExpandItem(h,VARIANT_TRUE);
349. How can I fix or lock an item on the top of the control
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->GetColumns()->Add(L"Default"); EXTREELib::IItemsPtr var_Items = spTree1->GetItems(); var_Items->PutLockedItemCount(EXTREELib::TopAlignment,1); var_Items->PutCellCaption(var_Items->GetLockedItem(EXTREELib::TopAlignment,0),long(0),"This is a locked item, fixed to the top side of the control."); long h = var_Items->AddItem("Root 1"); var_Items->InsertItem(h,long(0),"Child 1"); var_Items->InsertItem(h,long(0),"Child 2"); var_Items->PutExpandItem(h,VARIANT_TRUE);
348. Is there any function to limit the height of the items when I display it using multiple lines
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->PutScrollBySingleLine(VARIANT_TRUE); spTree1->GetColumns()->Add(L"C1"); spTree1->GetColumns()->Add(L"C2"); EXTREELib::IItemsPtr var_Items = spTree1->GetItems(); long h = var_Items->AddItem("Cell 1"); var_Items->PutCellCaption(h,long(1),_bstr_t("This is bit of text that's shown on multiple lines. This is bit of text that's shown on multipl") + "e lines."); var_Items->PutCellSingleLine(h,long(1),VARIANT_FALSE); var_Items->PutItemMaxHeight(h,48);
347. Why I cannot center my cells in the column
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->PutTreeColumnIndex(-1); spTree1->PutDrawGridLines(EXTREELib::exRowLines); ((EXTREELib::IColumnPtr)(spTree1->GetColumns()->Add(L"Default")))->PutAlignment(EXTREELib::CenterAlignment); spTree1->GetItems()->AddItem("item 1"); spTree1->GetItems()->AddItem("item 2"); spTree1->GetItems()->AddItem("item 3");
346. How can I align the cell to the left, center or to the right
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->PutTreeColumnIndex(-1); spTree1->PutDrawGridLines(EXTREELib::exRowLines); spTree1->GetColumns()->Add(L"Default"); EXTREELib::IItemsPtr var_Items = spTree1->GetItems(); var_Items->PutCellHAlignment(var_Items->AddItem("left"),long(0),EXTREELib::LeftAlignment); var_Items->PutCellHAlignment(var_Items->AddItem("center"),long(0),EXTREELib::CenterAlignment); var_Items->PutCellHAlignment(var_Items->AddItem("right"),long(0),EXTREELib::RightAlignment);
345. How do I apply HTML format to a cell
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->PutTreeColumnIndex(-1); spTree1->Images(_bstr_t("gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0") + "/oFBoVDolFo1HpFJpVLplNp1PqFRqVTqlVq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1" + "/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m0ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qO" + "x3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/y" + "NAOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA="); spTree1->PutHTMLPicture(L"p1","c:\\exontrol\\images\\zipdisk.gif"); spTree1->PutHTMLPicture(L"p2","c:\\exontrol\\images\\auction.gif"); spTree1->GetColumns()->Add(L"Default"); EXTREELib::IItemsPtr var_Items = spTree1->GetItems(); long h = var_Items->AddItem("The following item shows some of the HTML format supported:"); var_Items->PutCellHAlignment(h,long(0),EXTREELib::CenterAlignment); h = var_Items->AddItem(_bstr_t("<br>text icons <img>1</img>, <img>2</img>, ... pictures <img>p1</img>, <img>p2</img> <br><br>te") + "xt <b>bold</b>, <i>italic</i>, <u>underline</u>, <s>strikeout</s>, ...<br><dotline>and so on...<" + "br> <a>anchor</a> or <a2>hyperlink</a><br><fgcolor=FF0000>fgcolor</fgcolor> or <bgcolor=00FF00>b" + "gcolor</bgcolor> "); var_Items->PutCellCaptionFormat(h,long(0),EXTREELib::exHTML); var_Items->PutCellSingleLine(h,long(0),VARIANT_FALSE);
344. How can I change the font for a cell
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->GetColumns()->Add(L"Default"); spTree1->GetItems()->AddItem("std font"); EXTREELib::IItemsPtr var_Items = spTree1->GetItems(); var_Items->PutCellCaptionFormat(var_Items->AddItem("this <font tahoma;12>is a bit of text with</font> a different font"),long(0),EXTREELib::exHTML);
343. How can I change the font for a cell
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->GetColumns()->Add(L"Default"); spTree1->GetItems()->AddItem("default font"); /* Includes the definition for CreateObject function like follows: #include <comdef.h> IUnknownPtr CreateObject( BSTR Object ) { IUnknownPtr spResult; spResult.CreateInstance( Object ); return spResult; }; */ /* Copy and paste the following directives to your header file as it defines the namespace 'stdole' for the library: 'OLE Automation' #import <stdole2.tlb> */ stdole::FontPtr f = ::CreateObject(L"StdFont"); f->PutName(L"Tahoma"); f->PutSize(_variant_t(long(12))); EXTREELib::IItemsPtr var_Items = spTree1->GetItems(); var_Items->PutCellFont(var_Items->AddItem("new font"),long(0),IFontDispPtr(((stdole::FontPtr)(f))));
342. How can I change the font for entire item
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->GetColumns()->Add(L"Default"); spTree1->GetItems()->AddItem("default font"); /* Includes the definition for CreateObject function like follows: #include <comdef.h> IUnknownPtr CreateObject( BSTR Object ) { IUnknownPtr spResult; spResult.CreateInstance( Object ); return spResult; }; */ /* Copy and paste the following directives to your header file as it defines the namespace 'stdole' for the library: 'OLE Automation' #import <stdole2.tlb> */ stdole::FontPtr f = ::CreateObject(L"StdFont"); f->PutName(L"Tahoma"); f->PutSize(_variant_t(long(12))); EXTREELib::IItemsPtr var_Items = spTree1->GetItems(); var_Items->PutItemFont(var_Items->AddItem("new font"),IFontDispPtr(((stdole::FontPtr)(f))));
341. How do I vertically align a cell
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->PutDrawGridLines(EXTREELib::exRowLines); ((EXTREELib::IColumnPtr)(spTree1->GetColumns()->Add(L"MultipleLine")))->PutDef(EXTREELib::exCellSingleLine,VARIANT_FALSE); spTree1->GetColumns()->Add(L"VAlign"); EXTREELib::IItemsPtr var_Items = spTree1->GetItems(); long h = var_Items->AddItem("This is a bit of long text that should break the line"); var_Items->PutCellCaption(h,long(1),"top"); var_Items->PutCellVAlignment(h,long(1),EXTREELib::TopAlignment); h = var_Items->AddItem("This is a bit of long text that should break the line"); var_Items->PutCellCaption(h,long(1),"middle"); var_Items->PutCellVAlignment(h,long(1),EXTREELib::MiddleAlignment); h = var_Items->AddItem("This is a bit of long text that should break the line"); var_Items->PutCellCaption(h,long(1),"bottom"); var_Items->PutCellVAlignment(h,long(1),EXTREELib::BottomAlignment);
340. How can I change the position of an item
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->GetColumns()->Add(L"Default"); EXTREELib::IItemsPtr var_Items = spTree1->GetItems(); var_Items->AddItem("Item 1"); var_Items->AddItem("Item 2"); var_Items->PutItemPosition(var_Items->AddItem("Item 3"),0);
339. How do I find an item based on a path
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->GetColumns()->Add(L"Default"); EXTREELib::IItemsPtr var_Items = spTree1->GetItems(); long h = var_Items->AddItem("Root 1"); var_Items->InsertItem(h,long(0),"Child 1"); var_Items->PutItemData(var_Items->InsertItem(h,long(0),"Child 2"),long(1234)); var_Items->PutExpandItem(h,VARIANT_TRUE); var_Items->PutItemBold(var_Items->GetFindPath(L"Root 1\\Child 1"),VARIANT_TRUE);
338. How do I find an item based on my extra data
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->GetColumns()->Add(L"Default"); EXTREELib::IItemsPtr var_Items = spTree1->GetItems(); long h = var_Items->AddItem("Root 1"); var_Items->InsertItem(h,long(0),"Child 1"); var_Items->PutItemData(var_Items->InsertItem(h,long(0),"Child 2"),long(1234)); var_Items->PutExpandItem(h,VARIANT_TRUE); var_Items->PutItemBold(var_Items->GetFindItemData(long(1234),vtMissing),VARIANT_TRUE);
337. How do I find an item
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->GetColumns()->Add(L"Default"); EXTREELib::IItemsPtr var_Items = spTree1->GetItems(); long h = var_Items->AddItem("Root 1"); var_Items->InsertItem(h,long(0),"Child 1"); var_Items->InsertItem(h,long(0),"Child 2"); var_Items->PutExpandItem(h,VARIANT_TRUE); var_Items->PutItemBold(var_Items->GetFindItem("Child 2",long(0),vtMissing),VARIANT_TRUE);
336. How can I insert a hyperlink or an anchor element
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->GetColumns()->Add(L"Column"); EXTREELib::IItemsPtr var_Items = spTree1->GetItems(); var_Items->PutCellCaptionFormat(var_Items->AddItem("Just an <a1>anchor</a> element ..."),long(0),EXTREELib::exHTML); EXTREELib::IItemsPtr var_Items1 = spTree1->GetItems(); var_Items1->PutCellCaptionFormat(var_Items1->AddItem("Just another <a2>anchor</a> element ..."),long(0),EXTREELib::exHTML);
335. How do I find the index of the item based on its handle
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->GetColumns()->Add(L"Default"); EXTREELib::IItemsPtr var_Items = spTree1->GetItems(); long h = var_Items->AddItem("Root 1"); var_Items->InsertItem(h,long(0),"Child 1"); var_Items->InsertItem(h,long(0),"Child 2"); var_Items->PutExpandItem(h,VARIANT_TRUE); var_Items->PutItemBold(var_Items->GetItemByIndex(var_Items->GetItemToIndex(h)),VARIANT_TRUE);
334. How do I find the handle of the item based on its index
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->GetColumns()->Add(L"Default"); EXTREELib::IItemsPtr var_Items = spTree1->GetItems(); long h = var_Items->AddItem("Root 1"); var_Items->InsertItem(h,long(0),"Child 1"); var_Items->InsertItem(h,long(0),"Child 2"); var_Items->PutExpandItem(h,VARIANT_TRUE); var_Items->PutItemBold(var_Items->GetItemByIndex(1),VARIANT_TRUE);
333. How can I find the cell being clicked in a radio group
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->PutMarkSearchColumn(VARIANT_FALSE); spTree1->PutSelBackColor(RGB(255,255,128)); spTree1->PutSelForeColor(RGB(0,0,0)); spTree1->GetColumns()->Add(L"C1"); spTree1->GetColumns()->Add(L"C2"); spTree1->GetColumns()->Add(L"C3"); EXTREELib::IItemsPtr var_Items = spTree1->GetItems(); long h = var_Items->AddItem("Cell 1"); var_Items->PutCellCaption(h,long(1),"Radio 1"); var_Items->PutCellHasRadioButton(h,long(1),VARIANT_TRUE); var_Items->PutCellRadioGroup(h,long(1),1234); var_Items->PutCellCaption(h,long(2),"Radio 2"); var_Items->PutCellHasRadioButton(h,long(2),VARIANT_TRUE); var_Items->PutCellRadioGroup(h,long(2),1234); var_Items->PutCellState(h,long(1),1); var_Items->PutCellBold(long(0),var_Items->GetCellChecked(1234),VARIANT_TRUE);
332. Can I add a +/- ( expand / collapse ) buttons to each item, so I can load the child items later
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->PutLinesAtRoot(EXTREELib::exLinesAtRoot); spTree1->GetColumns()->Add(L"Default"); EXTREELib::IItemsPtr var_Items = spTree1->GetItems(); var_Items->PutItemHasChildren(var_Items->AddItem("parent item with no child items"),VARIANT_TRUE); var_Items->AddItem("next item");
331. Can I let the user to resize at runtime the specified item
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->PutScrollBySingleLine(VARIANT_TRUE); spTree1->PutDrawGridLines(EXTREELib::exRowLines); spTree1->GetColumns()->Add(L"Default"); EXTREELib::IItemsPtr var_Items = spTree1->GetItems(); var_Items->PutItemAllowSizing(var_Items->AddItem("resizable item"),VARIANT_TRUE); var_Items->AddItem("not resizable item");
330. How can I change the size ( width, height ) of the picture
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->GetColumns()->Add(L"Default"); EXTREELib::IItemsPtr var_Items = spTree1->GetItems(); long h = var_Items->AddItem("Root 1"); var_Items->PutCellPicture(h,long(0),((IDispatch*)(spTree1->ExecuteTemplate("loadpicture(`c:\\exontrol\\images\\zipdisk.gif`)")))); var_Items->PutCellPictureWidth(h,long(0),24); var_Items->PutCellPictureHeight(h,long(0),24); var_Items->PutItemHeight(h,32); h = var_Items->AddItem("Root 2"); var_Items->PutCellPicture(h,long(0),((IDispatch*)(spTree1->ExecuteTemplate("loadpicture(`c:\\exontrol\\images\\zipdisk.gif`)")))); var_Items->PutItemHeight(h,48);
329. How can I find the number or the count of selected items
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->PutSingleSel(VARIANT_FALSE); spTree1->GetColumns()->Add(L"Default"); EXTREELib::IItemsPtr var_Items = spTree1->GetItems(); long h = var_Items->AddItem("Root 1"); var_Items->InsertItem(h,long(0),"Child 1"); var_Items->InsertItem(h,long(0),"Child 2"); var_Items->PutExpandItem(h,VARIANT_TRUE); var_Items->PutSelectItem(var_Items->GetItemChild(h),VARIANT_TRUE); var_Items->PutSelectItem(var_Items->GetNextSiblingItem(var_Items->GetItemChild(h)),VARIANT_TRUE); var_Items->AddItem(var_Items->GetSelectCount());
328. How do I unselect an item
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->GetColumns()->Add(L"Default"); EXTREELib::IItemsPtr var_Items = spTree1->GetItems(); long h = var_Items->AddItem("Root 1"); var_Items->InsertItem(h,long(0),"Child 1"); var_Items->InsertItem(h,long(0),"Child 2"); var_Items->PutExpandItem(h,VARIANT_TRUE); var_Items->PutSelectItem(h,VARIANT_FALSE);
327. How do I find the selected item
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->GetColumns()->Add(L"Default"); EXTREELib::IItemsPtr var_Items = spTree1->GetItems(); long h = var_Items->AddItem("Root 1"); var_Items->InsertItem(h,long(0),"Child 1"); var_Items->InsertItem(h,long(0),"Child 2"); var_Items->PutExpandItem(h,VARIANT_TRUE); var_Items->PutSelectItem(h,VARIANT_TRUE); var_Items->PutItemBold(var_Items->GetSelectedItem(0),VARIANT_TRUE);
326. How do I un select all items
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->PutSingleSel(VARIANT_FALSE); spTree1->GetColumns()->Add(L"Default"); EXTREELib::IItemsPtr var_Items = spTree1->GetItems(); long h = var_Items->AddItem("Root 1"); var_Items->InsertItem(h,long(0),"Child 1"); var_Items->InsertItem(h,long(0),"Child 2"); var_Items->PutExpandItem(h,VARIANT_TRUE); var_Items->UnselectAll();
325. How do I select multiple items
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->PutSingleSel(VARIANT_FALSE); spTree1->GetColumns()->Add(L"Default"); EXTREELib::IItemsPtr var_Items = spTree1->GetItems(); long h = var_Items->AddItem("Root 1"); var_Items->InsertItem(h,long(0),"Child 1"); var_Items->InsertItem(h,long(0),"Child 2"); var_Items->PutExpandItem(h,VARIANT_TRUE); var_Items->PutSelectItem(var_Items->GetItemChild(h),VARIANT_TRUE); var_Items->PutSelectItem(var_Items->GetNextSiblingItem(var_Items->GetItemChild(h)),VARIANT_TRUE);
324. How do I select all items
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->PutSingleSel(VARIANT_FALSE); spTree1->GetColumns()->Add(L"Default"); EXTREELib::IItemsPtr var_Items = spTree1->GetItems(); long h = var_Items->AddItem("Root 1"); var_Items->InsertItem(h,long(0),"Child 1"); var_Items->InsertItem(h,long(0),"Child 2"); var_Items->PutExpandItem(h,VARIANT_TRUE); var_Items->SelectAll();
323. How do I select an item
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->GetColumns()->Add(L"Default"); EXTREELib::IItemsPtr var_Items = spTree1->GetItems(); long h = var_Items->AddItem("Root 1"); var_Items->InsertItem(h,long(0),"Child 1"); var_Items->InsertItem(h,long(0),"Child 2"); var_Items->PutExpandItem(h,VARIANT_TRUE); var_Items->PutSelectItem(h,VARIANT_TRUE);
322. Can I display a button with some picture or icon inside
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->PutHTMLPicture(L"p1","c:\\exontrol\\images\\zipdisk.gif"); spTree1->GetColumns()->Add(L"C1"); spTree1->GetColumns()->Add(L"C2"); EXTREELib::IItemsPtr var_Items = spTree1->GetItems(); long h = var_Items->AddItem("Cell 1"); var_Items->PutCellCaption(h,long(1)," Button <img>p1</img> "); var_Items->PutCellCaptionFormat(h,long(1),EXTREELib::exHTML); var_Items->PutCellHAlignment(h,long(1),EXTREELib::RightAlignment); var_Items->PutCellHasButton(h,long(1),VARIANT_TRUE); var_Items->PutCellButtonAutoWidth(h,long(1),VARIANT_TRUE); var_Items->PutItemHeight(h,48);
321. Can I display a button with some picture or icon inside
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->Images(_bstr_t("gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0") + "/oFBoVDolFo1HpFJpVLplNp1PqFRqVTqlVq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1" + "/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m0ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qO" + "x3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/y" + "NAOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA="); spTree1->GetColumns()->Add(L"C1"); spTree1->GetColumns()->Add(L"C2"); EXTREELib::IItemsPtr var_Items = spTree1->GetItems(); long h = var_Items->AddItem("Cell 1"); var_Items->PutCellCaption(h,long(1)," Button <img>1</img> "); var_Items->PutCellCaptionFormat(h,long(1),EXTREELib::exHTML); var_Items->PutCellHAlignment(h,long(1),EXTREELib::RightAlignment); var_Items->PutCellHasButton(h,long(1),VARIANT_TRUE); var_Items->PutCellButtonAutoWidth(h,long(1),VARIANT_TRUE);
320. Can I display a button with some icon inside
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->Images(_bstr_t("gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0") + "/oFBoVDolFo1HpFJpVLplNp1PqFRqVTqlVq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1" + "/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m0ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qO" + "x3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/y" + "NAOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA="); spTree1->GetColumns()->Add(L"C1"); spTree1->GetColumns()->Add(L"C2"); EXTREELib::IItemsPtr var_Items = spTree1->GetItems(); long h = var_Items->AddItem("Cell 1"); var_Items->PutCellCaption(h,long(1)," <img>1</img> "); var_Items->PutCellCaptionFormat(h,long(1),EXTREELib::exHTML); var_Items->PutCellHAlignment(h,long(1),EXTREELib::RightAlignment); var_Items->PutCellHasButton(h,long(1),VARIANT_TRUE); var_Items->PutCellButtonAutoWidth(h,long(1),VARIANT_TRUE);
319. How can I assign multiple icon/picture to a cell
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->PutHTMLPicture(L"p1","c:\\exontrol\\images\\zipdisk.gif"); spTree1->PutHTMLPicture(L"p2","c:\\exontrol\\images\\auction.gif"); spTree1->GetColumns()->Add(L"Default"); EXTREELib::IItemsPtr var_Items = spTree1->GetItems(); long h = var_Items->AddItem("text <img>p1</img> another picture <img>p2</img> and so on"); var_Items->PutCellCaptionFormat(h,long(0),EXTREELib::exHTML); var_Items->PutCellPicture(h,long(0),((IDispatch*)(spTree1->ExecuteTemplate("loadpicture(`c:\\exontrol\\images\\colorize.gif`)")))); var_Items->PutItemHeight(h,48); var_Items->AddItem("Root 2");
318. How can I assign an icon/picture to a cell
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->GetColumns()->Add(L"Default"); EXTREELib::IItemsPtr var_Items = spTree1->GetItems(); long h = var_Items->AddItem("Root 1"); var_Items->PutCellPicture(h,long(0),((IDispatch*)(spTree1->ExecuteTemplate("loadpicture(`c:\\exontrol\\images\\zipdisk.gif`)")))); var_Items->PutItemHeight(h,48); var_Items->AddItem("Root 2");
317. How can I assign multiple icons/pictures to a cell
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->Images(_bstr_t("gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0") + "/oFBoVDolFo1HpFJpVLplNp1PqFRqVTqlVq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1" + "/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m0ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qO" + "x3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/y" + "NAOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA="); spTree1->GetColumns()->Add(L"Default"); EXTREELib::IItemsPtr var_Items = spTree1->GetItems(); long h = var_Items->AddItem("Root <img>1</img> 1, <img>2</img>, ... and so on "); var_Items->PutCellCaptionFormat(h,long(0),EXTREELib::exHTML);
316. How can I assign multiple icons/pictures to a cell
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->Images(_bstr_t("gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0") + "/oFBoVDolFo1HpFJpVLplNp1PqFRqVTqlVq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1" + "/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m0ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qO" + "x3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/y" + "NAOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA="); spTree1->GetColumns()->Add(L"Default"); EXTREELib::IItemsPtr var_Items = spTree1->GetItems(); long h = var_Items->AddItem("Root 1"); var_Items->PutCellImages(h,long(0),"1,2,3");
315. How can I assign an icon/picture to a cell
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->Images(_bstr_t("gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0") + "/oFBoVDolFo1HpFJpVLplNp1PqFRqVTqlVq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1" + "/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m0ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qO" + "x3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/y" + "NAOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA="); spTree1->GetColumns()->Add(L"Default"); EXTREELib::IItemsPtr var_Items = spTree1->GetItems(); long h = var_Items->AddItem("Root 1"); var_Items->PutCellImage(h,long(0),1); var_Items->PutCellImage(var_Items->InsertItem(h,long(0),"Child 1"),long(0),2); var_Items->PutCellImage(var_Items->InsertItem(h,long(0),"Child 2"),long(0),3); var_Items->PutExpandItem(h,VARIANT_TRUE);
314. How can I get the handle of an item based on the handle of the cell
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->GetColumns()->Add(L"Default"); EXTREELib::IItemsPtr var_Items = spTree1->GetItems(); long h = var_Items->AddItem("Root 1"); var_Items->InsertItem(h,long(0),"Child 1"); var_Items->InsertItem(h,long(0),"Child 2"); var_Items->PutExpandItem(h,VARIANT_TRUE); var_Items->PutItemBold(var_Items->GetCellItem(var_Items->GetItemCell(h,long(0))),VARIANT_TRUE);
313. How can I display a button inside the item or cell
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->GetColumns()->Add(L"C1"); spTree1->GetColumns()->Add(L"C2"); EXTREELib::IItemsPtr var_Items = spTree1->GetItems(); long h = var_Items->AddItem("Cell 1"); var_Items->PutCellCaption(h,long(1)," Button 1 "); var_Items->PutCellHAlignment(h,long(1),EXTREELib::RightAlignment); var_Items->PutCellHasButton(h,long(1),VARIANT_TRUE); var_Items->PutCellButtonAutoWidth(h,long(1),VARIANT_TRUE); h = var_Items->AddItem("Cell 2"); var_Items->PutCellCaption(h,long(1)," Button 2 "); var_Items->PutCellHAlignment(h,long(1),EXTREELib::CenterAlignment); var_Items->PutCellHasButton(h,long(1),VARIANT_TRUE);
312. How can I change the state of a radio button
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->PutMarkSearchColumn(VARIANT_FALSE); spTree1->PutSelBackColor(RGB(255,255,128)); spTree1->PutSelForeColor(RGB(0,0,0)); spTree1->GetColumns()->Add(L"C1"); spTree1->GetColumns()->Add(L"C2"); spTree1->GetColumns()->Add(L"C3"); EXTREELib::IItemsPtr var_Items = spTree1->GetItems(); long h = var_Items->AddItem("Cell 1"); var_Items->PutCellCaption(h,long(1),"Radio 1"); var_Items->PutCellHasRadioButton(h,long(1),VARIANT_TRUE); var_Items->PutCellRadioGroup(h,long(1),1234); var_Items->PutCellCaption(h,long(2),"Radio 2"); var_Items->PutCellHasRadioButton(h,long(2),VARIANT_TRUE); var_Items->PutCellRadioGroup(h,long(2),1234); var_Items->PutCellState(h,long(1),1);
311. How can I assign a radio button to a cell
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->PutMarkSearchColumn(VARIANT_FALSE); spTree1->PutSelBackColor(RGB(255,255,128)); spTree1->PutSelForeColor(RGB(0,0,0)); spTree1->GetColumns()->Add(L"C1"); spTree1->GetColumns()->Add(L"C2"); spTree1->GetColumns()->Add(L"C3"); EXTREELib::IItemsPtr var_Items = spTree1->GetItems(); long h = var_Items->AddItem("Cell 1"); var_Items->PutCellCaption(h,long(1),"Radio 1"); var_Items->PutCellHasRadioButton(h,long(1),VARIANT_TRUE); var_Items->PutCellRadioGroup(h,long(1),1234); var_Items->PutCellCaption(h,long(2),"Radio 2"); var_Items->PutCellHasRadioButton(h,long(2),VARIANT_TRUE); var_Items->PutCellRadioGroup(h,long(2),1234); var_Items->PutCellState(h,long(1),1);
310. How can I change the state of a checkbox
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->GetColumns()->Add(L"C1"); spTree1->GetColumns()->Add(L"C2"); EXTREELib::IItemsPtr var_Items = spTree1->GetItems(); long h = var_Items->AddItem("Cell 1"); var_Items->PutCellCaption(h,long(1),"Check Box"); var_Items->PutCellHasCheckBox(h,long(1),VARIANT_TRUE); var_Items->PutCellState(h,long(1),1);
309. How can I assign a checkbox to a cell
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->GetColumns()->Add(L"C1"); spTree1->GetColumns()->Add(L"C2"); EXTREELib::IItemsPtr var_Items = spTree1->GetItems(); long h = var_Items->AddItem("Cell 1"); var_Items->PutCellCaption(h,long(1),"Check Box"); var_Items->PutCellHasCheckBox(h,long(1),VARIANT_TRUE);
308. How can I display an item or a cell on multiple lines
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->PutScrollBySingleLine(VARIANT_TRUE); spTree1->GetColumns()->Add(L"C1"); spTree1->GetColumns()->Add(L"C2"); EXTREELib::IItemsPtr var_Items = spTree1->GetItems(); long h = var_Items->AddItem("Cell 1"); var_Items->PutCellCaption(h,long(1),"This is bit of text that's shown on multiple lines"); var_Items->PutCellSingleLine(h,long(1),VARIANT_FALSE);
307. How can I assign a tooltip to a cell
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->GetColumns()->Add(L"C1"); spTree1->GetColumns()->Add(L"C2"); EXTREELib::IItemsPtr var_Items = spTree1->GetItems(); long h = var_Items->AddItem("Cell 1"); var_Items->PutCellCaption(h,long(1),"tooltip"); var_Items->PutCellToolTip(h,long(1),L"This is bit of text that's shown when the user hovers the cell");
306. How can I associate an extra data to a cell
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->GetColumns()->Add(L"C1"); spTree1->GetColumns()->Add(L"C2"); EXTREELib::IItemsPtr var_Items = spTree1->GetItems(); long h = var_Items->AddItem("Cell 1"); var_Items->PutCellCaption(h,long(1),"Cell 2"); var_Items->PutCellData(h,long(1),"your extra data");
305. How do I enable or disable a cell
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->GetColumns()->Add(L"C1"); spTree1->GetColumns()->Add(L"C2"); EXTREELib::IItemsPtr var_Items = spTree1->GetItems(); long h = var_Items->AddItem("Cell 1"); var_Items->PutCellCaption(h,long(1),"Cell 2"); var_Items->PutCellEnabled(h,long(1),VARIANT_FALSE);
304. How do I change the cell's foreground color
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->GetColumns()->Add(L"C1"); spTree1->GetColumns()->Add(L"C2"); EXTREELib::IItemsPtr var_Items = spTree1->GetItems(); long h = var_Items->AddItem("Cell 1"); var_Items->PutCellCaption(h,long(1),"Cell 2"); var_Items->PutCellForeColor(h,long(1),RGB(255,0,0));
303. How do I change the visual effect for the cell, using your EBN files
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->GetVisualAppearance()->Add(1,"c:\\exontrol\\images\\normal.ebn"); spTree1->GetColumns()->Add(L"C1"); spTree1->GetColumns()->Add(L"C2"); EXTREELib::IItemsPtr var_Items = spTree1->GetItems(); long h = var_Items->AddItem("Cell 1"); var_Items->PutCellCaption(h,long(1),"Cell 2"); var_Items->PutCellBackColor(h,long(1),0x1000000);
302. How do I change the cell's background color
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->GetColumns()->Add(L"C1"); spTree1->GetColumns()->Add(L"C2"); EXTREELib::IItemsPtr var_Items = spTree1->GetItems(); long h = var_Items->AddItem("Cell 1"); var_Items->PutCellCaption(h,long(1),"Cell 2"); var_Items->PutCellBackColor(h,long(1),RGB(255,0,0));
301. How do I change the caption or value for a particular cell
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->GetColumns()->Add(L"C1"); spTree1->GetColumns()->Add(L"C2"); EXTREELib::IItemsPtr var_Items = spTree1->GetItems(); var_Items->PutCellCaption(var_Items->AddItem("Cell 1"),long(1),"Cell 2");
300. How do I get the handle of the cell
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->GetColumns()->Add(L"Default"); EXTREELib::IItemsPtr var_Items = spTree1->GetItems(); long h = var_Items->AddItem("Root 1"); var_Items->InsertItem(h,long(0),"Child 1"); var_Items->InsertItem(h,long(0),"Child 2"); var_Items->PutExpandItem(h,VARIANT_TRUE); var_Items->PutCellBold(long(0),var_Items->GetItemCell(h,long(0)),VARIANT_TRUE);
299. How do I retrieve the focused item
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->GetColumns()->Add(L"Default"); EXTREELib::IItemsPtr var_Items = spTree1->GetItems(); long h = var_Items->AddItem("Root 1"); var_Items->InsertItem(h,long(0),"Child 1"); var_Items->InsertItem(h,long(0),"Child 2"); var_Items->PutExpandItem(h,VARIANT_TRUE); var_Items->PutItemBold(var_Items->GetFocusItem(),VARIANT_TRUE);
298. How do I get the number or count of child items
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->GetColumns()->Add(L"Default"); EXTREELib::IItemsPtr var_Items = spTree1->GetItems(); long h = var_Items->AddItem("Root 1"); var_Items->InsertItem(h,long(0),"Child 1"); var_Items->InsertItem(h,long(0),"Child 2"); var_Items->PutExpandItem(h,VARIANT_TRUE); var_Items->AddItem(var_Items->GetChildCount(h));
297. How do I enumerate the visible items
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->GetColumns()->Add(L"Default"); EXTREELib::IItemsPtr var_Items = spTree1->GetItems(); long h = var_Items->AddItem("Root 1"); var_Items->InsertItem(h,long(0),"Child 1"); var_Items->InsertItem(h,long(0),"Child 2"); var_Items->PutExpandItem(h,VARIANT_TRUE); h = var_Items->AddItem("Root 2"); var_Items->PutItemBold(var_Items->GetFirstVisibleItem(),VARIANT_TRUE); var_Items->PutItemBold(var_Items->GetNextVisibleItem(var_Items->GetFirstVisibleItem()),VARIANT_TRUE);
296. How do I enumerate the siblings items
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->GetColumns()->Add(L"Default"); EXTREELib::IItemsPtr var_Items = spTree1->GetItems(); long h = var_Items->AddItem("Root 1"); var_Items->InsertItem(h,long(0),"Child 1"); var_Items->InsertItem(h,long(0),"Child 2"); var_Items->PutExpandItem(h,VARIANT_TRUE); h = var_Items->AddItem("Root 2"); var_Items->PutItemBold(var_Items->GetNextSiblingItem(var_Items->GetFirstVisibleItem()),VARIANT_TRUE); var_Items->PutItemBold(var_Items->GetPrevSiblingItem(var_Items->GetNextSiblingItem(var_Items->GetFirstVisibleItem())),VARIANT_TRUE);
295. How do I get the parent item
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->GetColumns()->Add(L"Default"); EXTREELib::IItemsPtr var_Items = spTree1->GetItems(); long h = var_Items->AddItem("Root 1"); var_Items->InsertItem(h,long(0),"Child 1"); var_Items->InsertItem(h,long(0),"Child 2"); var_Items->PutExpandItem(h,VARIANT_TRUE); var_Items->PutItemBold(var_Items->GetItemParent(var_Items->GetItemChild(h)),VARIANT_TRUE);
294. How do I get the first child item
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->GetColumns()->Add(L"Default"); EXTREELib::IItemsPtr var_Items = spTree1->GetItems(); long h = var_Items->AddItem("Root 1"); var_Items->InsertItem(h,long(0),"Child 1"); var_Items->InsertItem(h,long(0),"Child 2"); var_Items->PutExpandItem(h,VARIANT_TRUE); var_Items->PutItemBold(var_Items->GetItemChild(h),VARIANT_TRUE);
293. How do I enumerate the root items
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->GetColumns()->Add(L"Default"); EXTREELib::IItemsPtr var_Items = spTree1->GetItems(); long h = var_Items->AddItem("Root 1"); var_Items->InsertItem(h,long(0),"Child 1"); var_Items->InsertItem(h,long(0),"Child 2"); var_Items->PutExpandItem(h,VARIANT_TRUE); h = var_Items->AddItem("Root 2"); var_Items->InsertItem(h,long(0),"Child 1"); var_Items->InsertItem(h,long(0),"Child 2"); var_Items->PutItemBold(var_Items->GetRootItem(0),VARIANT_TRUE); var_Items->PutItemUnderline(var_Items->GetRootItem(1),VARIANT_TRUE);
292. I have a hierarchy, how can I count the number of root items
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->GetColumns()->Add(L"Default"); EXTREELib::IItemsPtr var_Items = spTree1->GetItems(); long h = var_Items->AddItem("Root 1"); var_Items->InsertItem(h,long(0),"Child 1"); var_Items->InsertItem(h,long(0),"Child 2"); var_Items->PutExpandItem(h,VARIANT_TRUE); h = var_Items->AddItem("Root 2"); var_Items->InsertItem(h,long(0),"Child 1"); var_Items->InsertItem(h,long(0),"Child 2"); var_Items->AddItem(var_Items->GetRootCount());
291. How can I make an item unselectable, or not selectable
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->GetColumns()->Add(L"Column"); EXTREELib::IItemsPtr var_Items = spTree1->GetItems(); long h = var_Items->AddItem("unselectable - you can't get selected"); var_Items->PutSelectableItem(h,VARIANT_FALSE); var_Items->AddItem("selectable");
290. How can I hide or show an item
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->GetColumns()->Add(L"Column"); EXTREELib::IItemsPtr var_Items = spTree1->GetItems(); long h = var_Items->AddItem("hidden"); var_Items->PutItemHeight(h,0); var_Items->PutSelectableItem(h,VARIANT_FALSE); var_Items->AddItem("visible");
289. How can I change the height for all items
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->PutDefaultItemHeight(32); spTree1->GetColumns()->Add(L"Column"); spTree1->GetItems()->AddItem("One"); spTree1->GetItems()->AddItem("Two");
288. How do I change the height of an item
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->PutScrollBySingleLine(VARIANT_TRUE); spTree1->GetColumns()->Add(L"Default"); EXTREELib::IItemsPtr var_Items = spTree1->GetItems(); var_Items->PutItemHeight(var_Items->AddItem("height"),128); spTree1->GetItems()->AddItem("enabled");
287. How do I disable or enable an item
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->GetColumns()->Add(L"Default"); EXTREELib::IItemsPtr var_Items = spTree1->GetItems(); var_Items->PutEnableItem(var_Items->AddItem("disabled"),VARIANT_FALSE); spTree1->GetItems()->AddItem("enabled");
286. How do I display as strikeout a cell
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->GetColumns()->Add(L"Default"); EXTREELib::IItemsPtr var_Items = spTree1->GetItems(); var_Items->PutCellStrikeOut(var_Items->AddItem("strikeout"),long(0),VARIANT_TRUE);
285. How do I display as strikeout a cell or an item
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->GetColumns()->Add(L"Default"); EXTREELib::IItemsPtr var_Items = spTree1->GetItems(); var_Items->PutCellCaptionFormat(var_Items->AddItem("gets <s>strikeout</s> only a portion of text"),long(0),EXTREELib::exHTML);
284. How do I display as strikeout an item
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->GetColumns()->Add(L"Default"); EXTREELib::IItemsPtr var_Items = spTree1->GetItems(); var_Items->PutItemStrikeOut(var_Items->AddItem("strikeout"),VARIANT_TRUE);
283. How do I underline a cell
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->GetColumns()->Add(L"Default"); EXTREELib::IItemsPtr var_Items = spTree1->GetItems(); var_Items->PutCellUnderline(var_Items->AddItem("underline"),long(0),VARIANT_TRUE);
282. How do I underline a cell or an item
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->GetColumns()->Add(L"Default"); EXTREELib::IItemsPtr var_Items = spTree1->GetItems(); var_Items->PutCellCaptionFormat(var_Items->AddItem("gets <u>underline</u> only a portion of text"),long(0),EXTREELib::exHTML);
281. How do I underline an item
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->GetColumns()->Add(L"Default"); EXTREELib::IItemsPtr var_Items = spTree1->GetItems(); var_Items->PutItemUnderline(var_Items->AddItem("underline"),VARIANT_TRUE);
280. How do I display as italic a cell
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->GetColumns()->Add(L"Default"); EXTREELib::IItemsPtr var_Items = spTree1->GetItems(); var_Items->PutCellItalic(var_Items->AddItem("italic"),long(0),VARIANT_TRUE);
279. How do I display as italic a cell or an item
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->GetColumns()->Add(L"Default"); EXTREELib::IItemsPtr var_Items = spTree1->GetItems(); var_Items->PutCellCaptionFormat(var_Items->AddItem("gets <i>italic</i> only a portion of text"),long(0),EXTREELib::exHTML);
278. How do I display as italic an item
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->GetColumns()->Add(L"Default"); EXTREELib::IItemsPtr var_Items = spTree1->GetItems(); var_Items->PutItemItalic(var_Items->AddItem("italic"),VARIANT_TRUE);
277. How do I bold a cell
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->GetColumns()->Add(L"Default"); EXTREELib::IItemsPtr var_Items = spTree1->GetItems(); var_Items->PutCellBold(var_Items->AddItem("bold"),long(0),VARIANT_TRUE);
276. How do I bold a cell or an item
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->GetColumns()->Add(L"Default"); EXTREELib::IItemsPtr var_Items = spTree1->GetItems(); var_Items->PutCellCaptionFormat(var_Items->AddItem("gets <b>bold</b> only a portion of text"),long(0),EXTREELib::exHTML);
275. How do I bold an item
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->GetColumns()->Add(L"Default"); EXTREELib::IItemsPtr var_Items = spTree1->GetItems(); var_Items->PutItemBold(var_Items->AddItem("bold"),VARIANT_TRUE);
274. How do I change the foreground color for the item
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->GetColumns()->Add(L"Default"); EXTREELib::IItemsPtr var_Items = spTree1->GetItems(); long h = var_Items->AddItem("Root"); long hC = var_Items->InsertItem(h,long(0),"Child 1"); var_Items->PutItemForeColor(hC,RGB(255,0,0)); var_Items->InsertItem(h,long(0),"Child 2"); var_Items->PutExpandItem(h,VARIANT_TRUE);
273. How do I change the visual appearance for the item, using your EBN technology
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->GetVisualAppearance()->Add(1,"c:\\exontrol\\images\\normal.ebn"); spTree1->GetColumns()->Add(L"Default"); EXTREELib::IItemsPtr var_Items = spTree1->GetItems(); long h = var_Items->AddItem("Root"); long hC = var_Items->InsertItem(h,long(0),"Child 1"); var_Items->PutItemBackColor(hC,0x1000000); var_Items->InsertItem(h,long(0),"Child 2"); var_Items->PutExpandItem(h,VARIANT_TRUE);
272. How do I change the background color for the item
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->GetColumns()->Add(L"Default"); EXTREELib::IItemsPtr var_Items = spTree1->GetItems(); long h = var_Items->AddItem("Root"); long hC = var_Items->InsertItem(h,long(0),"Child 1"); var_Items->PutItemBackColor(hC,RGB(255,0,0)); var_Items->InsertItem(h,long(0),"Child 2"); var_Items->PutExpandItem(h,VARIANT_TRUE);
271. How do I expand or collapse an item
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->GetColumns()->Add(L"Default"); EXTREELib::IItemsPtr var_Items = spTree1->GetItems(); long h = var_Items->AddItem("Root"); var_Items->InsertItem(h,long(0),"Child 1"); var_Items->InsertItem(h,long(0),"Child 2"); var_Items->PutExpandItem(h,VARIANT_TRUE);
270. How do I associate an extra data to an item
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->GetColumns()->Add(L"Default"); EXTREELib::IItemsPtr var_Items = spTree1->GetItems(); var_Items->PutItemData(var_Items->AddItem("item"),"your extra data");
269. How do I get the number or count of items
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->GetColumns()->Add(L"Default"); EXTREELib::IItemsPtr var_Items = spTree1->GetItems(); long h = var_Items->AddItem("Root"); var_Items->InsertItem(h,long(0),"Child 1"); var_Items->InsertItem(h,long(0),"Child 2"); var_Items->PutExpandItem(h,VARIANT_TRUE); spTree1->GetItems()->AddItem(0->GetItemCount());
268. How can I specify the width of the ActiveX control, when using the InsertControlItem property
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->PutScrollBySingleLine(VARIANT_FALSE); spTree1->PutTreeColumnIndex(1); spTree1->PutDrawGridLines(EXTREELib::exAllLines); spTree1->GetColumns()->Add(L"C1"); spTree1->GetColumns()->Add(L"C2"); spTree1->GetColumns()->Add(L"C3"); EXTREELib::IItemsPtr var_Items = spTree1->GetItems(); long h = var_Items->InsertControlItem(0,L"MSCAL.Calendar",vtMissing); var_Items->PutItemWidth(h,128); var_Items->PutCellCaption(h,long(0),"This is a bit of text that is shown in the first column"); var_Items->PutCellSingleLine(h,long(0),VARIANT_FALSE); var_Items->PutCellCaption(h,long(2),"This is a bit of text that is shown in the third column"); var_Items->PutCellSingleLine(h,long(2),VARIANT_FALSE);
267. How can I put the ActiveX control in a different column, when using the InsertControlItem property
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->PutScrollBySingleLine(VARIANT_FALSE); spTree1->PutDrawGridLines(EXTREELib::exAllLines); spTree1->GetColumns()->Add(L"C1"); spTree1->GetColumns()->Add(L"C2"); spTree1->GetColumns()->Add(L"C3"); EXTREELib::IItemsPtr var_Items = spTree1->GetItems(); long h = var_Items->InsertControlItem(0,L"MSCAL.Calendar",vtMissing); var_Items->PutCellCaption(h,long(0),"This is a bit of text that is shown in the first column"); var_Items->PutCellSingleLine(h,long(0),VARIANT_FALSE); var_Items->PutItemWidth(h,-32001); var_Items->PutCellCaption(h,long(2),"This is a bit of text that is shown in the third column"); var_Items->PutCellSingleLine(h,long(2),VARIANT_FALSE);
266. Is there any function I can use to get the program or the control identifier I've been using when called the InsertControlItem
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->GetColumns()->Add(L"Default"); spTree1->PutScrollBySingleLine(VARIANT_FALSE); spTree1->PutLinesAtRoot(EXTREELib::exLinesAtRoot); EXTREELib::IItemsPtr var_Items = spTree1->GetItems(); long h = var_Items->InsertControlItem(0,L"MSCAL.Calendar",vtMissing); var_Items->InsertItem(h,long(0),var_Items->GetItemControlID(h)); var_Items->PutExpandItem(h,VARIANT_TRUE); h = var_Items->InsertControlItem(0,L"MSChart20Lib.MSChart",vtMissing); var_Items->PutItemAppearance(h,EXTREELib::Etched); var_Items->InsertItem(h,long(0),var_Items->GetItemControlID(h)); var_Items->PutExpandItem(h,VARIANT_TRUE);
265. How can I change the height of newly created ActiveX control, using the InsertControlItem
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->GetColumns()->Add(L"Default"); spTree1->PutScrollBySingleLine(VARIANT_FALSE); EXTREELib::IItemsPtr var_Items = spTree1->GetItems(); var_Items->PutItemHeight(var_Items->InsertControlItem(0,L"MSCAL.Calendar",vtMissing),64); var_Items->PutItemAppearance(var_Items->InsertControlItem(0,L"MSChart20Lib.MSChart",vtMissing),EXTREELib::Etched);
264. How can I change the border for newly created ActiveX control, using the InsertControlItem
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->GetColumns()->Add(L"Default"); spTree1->PutScrollBySingleLine(VARIANT_FALSE); EXTREELib::IItemsPtr var_Items = spTree1->GetItems(); var_Items->PutItemAppearance(var_Items->InsertControlItem(0,L"MSCAL.Calendar",vtMissing),EXTREELib::Sunken); var_Items->PutItemAppearance(var_Items->InsertControlItem(0,L"MSChart20Lib.MSChart",vtMissing),EXTREELib::Etched);
263. How can I access the properties and methods for an ActiveX control that I've just added using the InsertControlItem
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->GetColumns()->Add(L"Default"); EXTREELib::IItemsPtr var_Items = spTree1->GetItems(); long h = var_Items->AddItem("Root"); /* Copy and paste the following directives to your header file as it defines the namespace 'MSACAL' for the library: 'Microsoft Calendar Control 2007' #import <MSCAL.OCX> */ MSACAL::ICalendarPtr var_Calendar = ((MSACAL::ICalendarPtr)(var_Items->GetItemObject(var_Items->InsertControlItem(h,L"MSCAL.Calendar",vtMissing)))); var_Calendar->PutBackColor(RGB(255,255,255)); var_Calendar->PutGridCellEffect(0); var_Calendar->PutShowTitle(VARIANT_FALSE); var_Calendar->PutShowDateSelectors(VARIANT_FALSE); var_Items->PutExpandItem(h,VARIANT_TRUE);
262. How can I access the properties and methods for an ActiveX control that I've just added using the InsertControlItem
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->GetColumns()->Add(L"Default"); EXTREELib::IItemsPtr var_Items = spTree1->GetItems(); long h = var_Items->AddItem("Root"); /* Copy and paste the following directives to your header file as it defines the namespace 'MSACAL' for the library: 'Microsoft Calendar Control 2007' #import <MSCAL.OCX> */ MSACAL::ICalendarPtr var_Calendar = ((MSACAL::ICalendarPtr)(var_Items->GetItemObject(var_Items->InsertControlItem(h,L"MSCAL.Calendar",vtMissing)))); var_Calendar->PutBackColor(RGB(255,255,255)); var_Items->PutExpandItem(h,VARIANT_TRUE);
261. How can I insert an ActiveX control
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->GetColumns()->Add(L"Default"); EXTREELib::IItemsPtr var_Items = spTree1->GetItems(); long h = var_Items->AddItem("Root"); var_Items->InsertControlItem(h,L"MSCAL.Calendar",vtMissing); var_Items->PutExpandItem(h,VARIANT_TRUE);
260. How do I programmatically edit a cell
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->PutAllowEdit(VARIANT_TRUE); spTree1->GetItems()->Edit(0->GetFocusItem(),long(0));
259. How can I change at runtime the parent of the item
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->PutLinesAtRoot(EXTREELib::exLinesAtRoot); spTree1->GetColumns()->Add(L"Default"); EXTREELib::IItemsPtr var_Items = spTree1->GetItems(); long hP = var_Items->AddItem("Root"); long hC = var_Items->AddItem("Child"); var_Items->SetParent(hC,hP);
258. How can I sort the items
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->GetColumns()->Add(L"Default"); EXTREELib::IItemsPtr var_Items = spTree1->GetItems(); long h = var_Items->AddItem("Root"); var_Items->InsertItem(h,long(0),"Child 1"); var_Items->InsertItem(h,long(0),"Child 2"); var_Items->PutExpandItem(h,VARIANT_TRUE); spTree1->GetColumns()->GetItem("Default")->PutSortOrder(EXTREELib::SortDescending);
257. How do I sort the child items
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->GetColumns()->Add(L"Default"); EXTREELib::IItemsPtr var_Items = spTree1->GetItems(); long h = var_Items->AddItem("Root"); var_Items->InsertItem(h,long(0),"Child 1"); var_Items->InsertItem(h,long(0),"Child 2"); var_Items->PutExpandItem(h,VARIANT_TRUE); var_Items->SortChildren(h,long(0),VARIANT_FALSE);
256. How can I ensure or scroll the control so the item fits the control's client area
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->GetColumns()->Add(L"Default"); long h = spTree1->GetItems()->AddItem("item"); spTree1->GetItems()->EnsureVisibleItem(h);
255. How can I remove or delete all items
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->GetColumns()->Add(L"Default"); spTree1->GetItems()->AddItem("removed item"); spTree1->GetItems()->RemoveAllItems();
254. How can I remove or delete an item
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->GetColumns()->Add(L"Default"); long h = spTree1->GetItems()->AddItem("removed item"); spTree1->GetItems()->RemoveItem(h);
253. How can I add or insert child items
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->PutLinesAtRoot(EXTREELib::exLinesAtRoot); spTree1->GetColumns()->Add(L"C1"); spTree1->GetColumns()->Add(L"C2"); EXTREELib::IItemsPtr var_Items = spTree1->GetItems(); long h = var_Items->AddItem("Cell 1"); var_Items->PutCellCaption(h,long(1),"Cell 2"); var_Items->PutCellCaption(var_Items->InsertItem(h,long(0),"Cell 3"),long(1),"Cell 4"); var_Items->PutCellCaption(var_Items->InsertItem(h,long(0),"Cell 5"),long(1),"Cell 6"); var_Items->PutExpandItem(h,VARIANT_TRUE);
252. How can I add or insert a child item
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->PutLinesAtRoot(EXTREELib::exLinesAtRoot); spTree1->GetColumns()->Add(L"Default"); EXTREELib::IItemsPtr var_Items = spTree1->GetItems(); var_Items->InsertItem(var_Items->AddItem("root"),long(0),"child");
251. How can I add or insert an item
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->GetColumns()->Add(L"C1"); spTree1->GetColumns()->Add(L"C2"); EXTREELib::IItemsPtr var_Items = spTree1->GetItems(); var_Items->PutCellCaption(var_Items->AddItem("Cell 1"),long(1),"Cell 2"); long h = var_Items->AddItem("Cell 3"); var_Items->PutCellCaption(h,long(1),"Cell 4");
250. How can I add or insert an item
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->GetColumns()->Add(L"Default"); spTree1->GetItems()->AddItem("new item");
249. How can I get the columns as they are shown in the control's sortbar
/*
Copy and paste the following directives to your header file as
it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library'
#import <ExTree.dll>
using namespace EXTREELib;
*/
EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown();
ObjectPtr var_Object = ((ObjectPtr)(spTree1->GetColumns()->GetItemBySortPosition(long(0))));
248. How can I access the properties of a column
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->GetColumns()->Add(L"A"); spTree1->GetColumns()->GetItem("A")->PutHeaderBold(VARIANT_TRUE);
247. How can I remove all the columns
/*
Copy and paste the following directives to your header file as
it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library'
#import <ExTree.dll>
using namespace EXTREELib;
*/
EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown();
spTree1->GetColumns()->Clear();
246. How can I remove a column
/*
Copy and paste the following directives to your header file as
it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library'
#import <ExTree.dll>
using namespace EXTREELib;
*/
EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown();
spTree1->GetColumns()->Remove("A");
245. How can I get the number or the count of columns
/*
Copy and paste the following directives to your header file as
it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library'
#import <ExTree.dll>
using namespace EXTREELib;
*/
EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown();
long var_Count = spTree1->GetColumns()->GetCount();
244. How can I change the font for all cells in the entire column
/*
Copy and paste the following directives to your header file as
it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library'
#import <ExTree.dll>
using namespace EXTREELib;
*/
EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown();
/*
Includes the definition for CreateObject function like follows:
#include <comdef.h>
IUnknownPtr CreateObject( BSTR Object )
{
IUnknownPtr spResult;
spResult.CreateInstance( Object );
return spResult;
};
*/
/*
Copy and paste the following directives to your header file as
it defines the namespace 'stdole' for the library: 'OLE Automation'
#import <stdole2.tlb>
*/
stdole::FontPtr f = ::CreateObject(L"StdFont");
f->PutName(L"Tahoma");
f->PutSize(_variant_t(long(12)));
EXTREELib::IConditionalFormatPtr var_ConditionalFormat = spTree1->GetConditionalFormats()->Add(L"1",vtMissing);
var_ConditionalFormat->PutFont(IFontDispPtr(((stdole::FontPtr)(f))));
var_ConditionalFormat->PutApplyTo(EXTREELib::exFormatToColumns);
spTree1->GetColumns()->Add(L"Column");
spTree1->GetItems()->AddItem(long(0));
spTree1->GetItems()->AddItem(long(1));
243. How can I change the background color for all cells in the column
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); EXTREELib::IConditionalFormatPtr var_ConditionalFormat = spTree1->GetConditionalFormats()->Add(L"1",vtMissing); var_ConditionalFormat->PutBackColor(RGB(255,0,0)); var_ConditionalFormat->PutApplyTo(EXTREELib::exFormatToColumns); spTree1->GetColumns()->Add(L"Column"); spTree1->GetItems()->AddItem(long(0)); spTree1->GetItems()->AddItem(long(1));
242. How can I change the foreground color for all cells in the column
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); EXTREELib::IConditionalFormatPtr var_ConditionalFormat = spTree1->GetConditionalFormats()->Add(L"1",vtMissing); var_ConditionalFormat->PutForeColor(RGB(255,0,0)); var_ConditionalFormat->PutApplyTo(EXTREELib::exFormatToColumns); spTree1->GetColumns()->Add(L"Column"); spTree1->GetItems()->AddItem(long(0)); spTree1->GetItems()->AddItem(long(1));
241. How can I show as strikeout all cells in the column
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); EXTREELib::IConditionalFormatPtr var_ConditionalFormat = spTree1->GetConditionalFormats()->Add(L"1",vtMissing); var_ConditionalFormat->PutStrikeOut(VARIANT_TRUE); var_ConditionalFormat->PutApplyTo(EXTREELib::exFormatToColumns); spTree1->GetColumns()->Add(L"Column"); spTree1->GetItems()->AddItem(long(0)); spTree1->GetItems()->AddItem(long(1));
240. How can I underline all cells in the column
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); EXTREELib::IConditionalFormatPtr var_ConditionalFormat = spTree1->GetConditionalFormats()->Add(L"1",vtMissing); var_ConditionalFormat->PutUnderline(VARIANT_TRUE); var_ConditionalFormat->PutApplyTo(EXTREELib::exFormatToColumns); spTree1->GetColumns()->Add(L"Column"); spTree1->GetItems()->AddItem(long(0)); spTree1->GetItems()->AddItem(long(1));
239. How can I show in italic all data in the column
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); EXTREELib::IConditionalFormatPtr var_ConditionalFormat = spTree1->GetConditionalFormats()->Add(L"1",vtMissing); var_ConditionalFormat->PutItalic(VARIANT_TRUE); var_ConditionalFormat->PutApplyTo(EXTREELib::exFormatToColumns); spTree1->GetColumns()->Add(L"Column"); spTree1->GetItems()->AddItem(long(0)); spTree1->GetItems()->AddItem(long(1));
238. How can I bold the entire column
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); EXTREELib::IConditionalFormatPtr var_ConditionalFormat = spTree1->GetConditionalFormats()->Add(L"1",vtMissing); var_ConditionalFormat->PutBold(VARIANT_TRUE); var_ConditionalFormat->PutApplyTo(EXTREELib::exFormatToColumns); spTree1->GetColumns()->Add(L"Column"); spTree1->GetItems()->AddItem(long(0)); spTree1->GetItems()->AddItem(long(1));
237. How can I display a computed column and highlight some values that are negative or less than a value
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->GetColumns()->Add(L"A"); spTree1->GetColumns()->Add(L"B"); ((EXTREELib::IColumnPtr)(spTree1->GetColumns()->Add(L"(A+B)*1.19")))->PutComputedField(L"(%0 + %1) * 1.19"); EXTREELib::IItemsPtr var_Items = spTree1->GetItems(); var_Items->PutCellCaption(var_Items->AddItem(long(1)),long(1),long(2)); EXTREELib::IItemsPtr var_Items1 = spTree1->GetItems(); var_Items1->PutCellCaption(var_Items1->AddItem(long(10)),long(1),long(20)); EXTREELib::IConditionalFormatPtr var_ConditionalFormat = spTree1->GetConditionalFormats()->Add(L"%2 > 10",vtMissing); var_ConditionalFormat->PutBold(VARIANT_TRUE); var_ConditionalFormat->PutForeColor(RGB(255,0,0)); var_ConditionalFormat->PutApplyTo(EXTREELib::FormatApplyToEnum(0x2));
236. Can I display a computed column so it displays the VAT, or SUM
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->GetColumns()->Add(L"A"); spTree1->GetColumns()->Add(L"B"); ((EXTREELib::IColumnPtr)(spTree1->GetColumns()->Add(L"(A+B)*1.19")))->PutComputedField(L"(%0 + %1) * 1.19"); EXTREELib::IItemsPtr var_Items = spTree1->GetItems(); var_Items->PutCellCaption(var_Items->AddItem(long(1)),long(1),long(2)); EXTREELib::IItemsPtr var_Items1 = spTree1->GetItems(); var_Items1->PutCellCaption(var_Items1->AddItem(long(10)),long(1),long(20));
235. How can I show a column that adds values in the cells
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->GetColumns()->Add(L"A"); spTree1->GetColumns()->Add(L"B"); ((EXTREELib::IColumnPtr)(spTree1->GetColumns()->Add(L"A+B")))->PutComputedField(L"%0 + %1"); EXTREELib::IItemsPtr var_Items = spTree1->GetItems(); var_Items->PutCellCaption(var_Items->AddItem(long(1)),long(1),long(2)); EXTREELib::IItemsPtr var_Items1 = spTree1->GetItems(); var_Items1->PutCellCaption(var_Items1->AddItem(long(10)),long(1),long(20));
234. Is there any function to filter the control's data as I type, so the items being displayed include the typed characters
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); EXTREELib::IColumnPtr var_Column = ((EXTREELib::IColumnPtr)(spTree1->GetColumns()->Add(L"Filter"))); var_Column->PutFilterOnType(VARIANT_TRUE); var_Column->PutDisplayFilterButton(VARIANT_TRUE); var_Column->PutAutoSearch(EXTREELib::exContains); spTree1->GetItems()->AddItem("Canada"); spTree1->GetItems()->AddItem("USA");
233. Is there any function to filter the control's data as I type, something like filter on type
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); EXTREELib::IColumnPtr var_Column = ((EXTREELib::IColumnPtr)(spTree1->GetColumns()->Add(L"Filter"))); var_Column->PutFilterOnType(VARIANT_TRUE); var_Column->PutDisplayFilterButton(VARIANT_TRUE); spTree1->GetItems()->AddItem("Canada"); spTree1->GetItems()->AddItem("USA");
232. How can I programmatically filter a column
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); EXTREELib::IColumnPtr var_Column = ((EXTREELib::IColumnPtr)(spTree1->GetColumns()->Add(L"Filter"))); var_Column->PutDisplayFilterButton(VARIANT_TRUE); var_Column->PutFilterType(EXTREELib::exNonBlanks); spTree1->GetItems()->AddItem(vtMissing); spTree1->GetItems()->AddItem("not empty"); spTree1->ApplyFilter();
231. How can I show or display the control's filter
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); ((EXTREELib::IColumnPtr)(spTree1->GetColumns()->Add(L"Filter")))->PutDisplayFilterButton(VARIANT_TRUE);
230. How can I customize the items being displayed in the drop down filter window
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); EXTREELib::IColumnPtr var_Column = ((EXTREELib::IColumnPtr)(spTree1->GetColumns()->Add(L"Custom Filter"))); var_Column->PutDisplayFilterButton(VARIANT_TRUE); var_Column->PutDisplayFilterPattern(VARIANT_FALSE); var_Column->PutCustomFilter(_bstr_t("Excel Spreadsheets (*.xls )||*.xls|||Word Documents||*.doc|||Powerpoint Presentations||*.pps|||") + "Text Documents (*.log,*.txt)||*.txt|*.log"); var_Column->PutFilterType(EXTREELib::exPattern); var_Column->PutFilter(L"*.xls"); spTree1->GetItems()->AddItem("excel.xls"); spTree1->GetItems()->AddItem("word.doc"); spTree1->GetItems()->AddItem("pp.pps"); spTree1->GetItems()->AddItem("text.txt"); spTree1->ApplyFilter();
229. How can I change the order or the position of the columns in the sort bar
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->PutSortBarVisible(VARIANT_TRUE); spTree1->PutSortBarColumnWidth(48); ((EXTREELib::IColumnPtr)(spTree1->GetColumns()->Add(L"C1")))->PutSortOrder(EXTREELib::SortAscending); ((EXTREELib::IColumnPtr)(spTree1->GetColumns()->Add(L"C2")))->PutSortOrder(EXTREELib::SortDescending); spTree1->GetColumns()->GetItem("C2")->PutSortPosition(0);
228. How do I arrange my columns on multiple levels
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); ((EXTREELib::IColumnPtr)(spTree1->GetColumns()->Add(L"S")))->PutWidth(32); ((EXTREELib::IColumnPtr)(spTree1->GetColumns()->Add(L"Level 2")))->PutLevelKey(long(1)); ((EXTREELib::IColumnPtr)(spTree1->GetColumns()->Add(L"Level 3")))->PutLevelKey(long(1)); ((EXTREELib::IColumnPtr)(spTree1->GetColumns()->Add(L"Level 4")))->PutLevelKey(long(1)); ((EXTREELib::IColumnPtr)(spTree1->GetColumns()->Add(L"Level 1")))->PutLevelKey("2"); ((EXTREELib::IColumnPtr)(spTree1->GetColumns()->Add(L"Level 2")))->PutLevelKey("2"); ((EXTREELib::IColumnPtr)(spTree1->GetColumns()->Add(L"Level 3")))->PutLevelKey("2"); ((EXTREELib::IColumnPtr)(spTree1->GetColumns()->Add(L"Level 4")))->PutLevelKey("2"); ((EXTREELib::IColumnPtr)(spTree1->GetColumns()->Add(L"E")))->PutWidth(32);
227. How do I arrange my columns on multiple lines
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->PutHeaderHeight(32); ((EXTREELib::IColumnPtr)(spTree1->GetColumns()->Add(L"")))->PutHTMLCaption(L"Line 1<br>Line 2");
226. How can I display all cells using HTML format
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); ((EXTREELib::IColumnPtr)(spTree1->GetColumns()->Add(L"HTML")))->PutDef(EXTREELib::exCellCaptionFormat,long(1)); spTree1->GetItems()->AddItem(_bstr_t("<font ;12>T</font>his <b>is</b> an <a>html</a> <font Tahoma><fgcolor=FF0000>text</fgcolor></fon") + "t>.");
225. How can I display all cells using multiple lines
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); ((EXTREELib::IColumnPtr)(spTree1->GetColumns()->Add(L"MultipleLine")))->PutDef(EXTREELib::exCellSingleLine,VARIANT_FALSE); ((EXTREELib::IColumnPtr)(spTree1->GetColumns()->Add(L"SingleLine")))->PutDef(EXTREELib::exCellSingleLine,VARIANT_TRUE); EXTREELib::IItemsPtr var_Items = spTree1->GetItems(); var_Items->PutCellCaption(var_Items->AddItem("This is a bit of long text that should break the line"),long(1),"this is a bit of long text that's displayed on a single line");
224. How do change the vertical alignment for all cells in the column
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); ((EXTREELib::IColumnPtr)(spTree1->GetColumns()->Add(L"MultipleLine")))->PutDef(EXTREELib::exCellSingleLine,VARIANT_FALSE); ((EXTREELib::IColumnPtr)(spTree1->GetColumns()->Add(L"VAlign")))->PutDef(EXTREELib::exCellVAlignment,long(2)); EXTREELib::IItemsPtr var_Items = spTree1->GetItems(); var_Items->PutCellCaption(var_Items->AddItem("This is a bit of long text that should break the line"),long(1),"bottom"); EXTREELib::IItemsPtr var_Items1 = spTree1->GetItems(); var_Items1->PutCellCaption(var_Items1->AddItem("This is a bit of long text that should break the line"),long(1),"bottom");
223. How do change the foreground color for all cells in the column
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); ((EXTREELib::IColumnPtr)(spTree1->GetColumns()->Add(L"ForeColor")))->PutDef(EXTREELib::exCellForeColor,long(255)); spTree1->GetItems()->AddItem(long(0)); spTree1->GetItems()->AddItem(long(1));
222. How do change the background color for all cells in the column
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); ((EXTREELib::IColumnPtr)(spTree1->GetColumns()->Add(L"BackColor")))->PutDef(EXTREELib::exCellBackColor,long(255)); spTree1->GetItems()->AddItem(long(0)); spTree1->GetItems()->AddItem(long(1));
221. How do I show buttons for all cells in the column
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); EXTREELib::IColumnPtr var_Column = ((EXTREELib::IColumnPtr)(spTree1->GetColumns()->Add(L"Button"))); var_Column->PutDef(EXTREELib::exCellHasButton,VARIANT_TRUE); var_Column->PutDef(EXTREELib::exCellButtonAutoWidth,VARIANT_TRUE); spTree1->GetItems()->AddItem(" Button 1 "); spTree1->GetItems()->AddItem(" Button 2 ");
220. How do I show buttons for all cells in the column
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); ((EXTREELib::IColumnPtr)(spTree1->GetColumns()->Add(L"Button")))->PutDef(EXTREELib::exCellHasButton,VARIANT_TRUE); spTree1->GetItems()->AddItem(long(0)); spTree1->GetItems()->AddItem(long(1));
219. How do I display radio buttons for all cells in the column
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); ((EXTREELib::IColumnPtr)(spTree1->GetColumns()->Add(L"Radio")))->PutDef(EXTREELib::exCellHasRadioButton,VARIANT_TRUE); spTree1->GetItems()->AddItem(long(0)); spTree1->GetItems()->AddItem(long(1));
218. How do I display checkboxes for all cells in the column
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); ((EXTREELib::IColumnPtr)(spTree1->GetColumns()->Add(L"Check")))->PutDef(EXTREELib::exCellHasCheckBox,VARIANT_TRUE); spTree1->GetItems()->AddItem(long(0)); spTree1->GetItems()->AddItem(long(1));
217. How can I display a tooltip when the cursor hovers the column
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); ((EXTREELib::IColumnPtr)(spTree1->GetColumns()->Add(L"tooltip")))->PutToolTip(L"This is a bit of text that is shown when user hovers the column.");
216. Is there any function to assign a key to a column instead using its name or capion
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); ((EXTREELib::IColumnPtr)(spTree1->GetColumns()->Add(L"Data")))->PutKey(L"DKey"); spTree1->GetColumns()->GetItem("DKey")->PutCaption(L"new caption");
215. Is there any function to assign any extra data to a column
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); ((EXTREELib::IColumnPtr)(spTree1->GetColumns()->Add(L"Data")))->PutData("your extra data");
214. By default, the column gets sorted descending, when I first click its header. How can I change so the column gets sorted ascending when the user first clicks the column's header
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); ((EXTREELib::IColumnPtr)(spTree1->GetColumns()->Add(L"Sort")))->PutDefaultSortOrder(VARIANT_TRUE);
213. How can I specify the maximum width for the column, if I use WidthAutoResize property
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); EXTREELib::IColumnPtr var_Column = ((EXTREELib::IColumnPtr)(spTree1->GetColumns()->Add(L"Auto"))); var_Column->PutWidthAutoResize(VARIANT_TRUE); var_Column->PutMinWidthAutoResize(32); var_Column->PutMaxWidthAutoResize(128); spTree1->GetItems()->AddItem(long(0)); spTree1->GetItems()->AddItem(long(1));
212. How can I specify the minimum width for the column, if I use WidthAutoResize property
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); EXTREELib::IColumnPtr var_Column = ((EXTREELib::IColumnPtr)(spTree1->GetColumns()->Add(L"Auto"))); var_Column->PutWidthAutoResize(VARIANT_TRUE); var_Column->PutMinWidthAutoResize(32); spTree1->GetItems()->AddItem(long(0)); spTree1->GetItems()->AddItem(long(1));
211. Is there any option to resize the column based on its data, captions
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); ((EXTREELib::IColumnPtr)(spTree1->GetColumns()->Add(L"A")))->PutWidthAutoResize(VARIANT_TRUE); spTree1->GetItems()->AddItem(long(0)); spTree1->GetItems()->AddItem(long(1));
210. How can I align the icon in the column's header in the center
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->Images(_bstr_t("gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0") + "/oFBoVDolFo1HpFJpVLplNp1PqFRqVTqlVq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1" + "/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m0ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qO" + "x3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/y" + "NAOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA="); EXTREELib::IColumnPtr var_Column = ((EXTREELib::IColumnPtr)(spTree1->GetColumns()->Add(L""))); var_Column->PutHeaderImage(1); var_Column->PutHeaderImageAlignment(EXTREELib::CenterAlignment);
209. How do I align the icon in the column's header to the right
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->Images(_bstr_t("gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0") + "/oFBoVDolFo1HpFJpVLplNp1PqFRqVTqlVq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1" + "/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m0ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qO" + "x3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/y" + "NAOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA="); EXTREELib::IColumnPtr var_Column = ((EXTREELib::IColumnPtr)(spTree1->GetColumns()->Add(L"ColumnName"))); var_Column->PutHeaderImage(1); var_Column->PutHeaderImageAlignment(EXTREELib::RightAlignment);
208. How do I show or hide the sorting icons, but still need sorting
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); ((EXTREELib::IColumnPtr)(spTree1->GetColumns()->Add(L"Sorted")))->PutSortOrder(EXTREELib::SortAscending); spTree1->GetColumns()->GetItem(long(0))->PutDisplaySortIcon(VARIANT_FALSE);
207. How do I enable or disable the entire column
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->GetColumns()->Add(L"C1"); ((EXTREELib::IColumnPtr)(spTree1->GetColumns()->Add(L"Disabled")))->PutEnabled(VARIANT_FALSE); EXTREELib::IItemsPtr var_Items = spTree1->GetItems(); var_Items->PutCellCaption(var_Items->AddItem(long(0)),long(1),"0.1"); EXTREELib::IItemsPtr var_Items1 = spTree1->GetItems(); var_Items1->PutCellCaption(var_Items1->AddItem(long(1)),long(1),"1.1");
206. How do I disable drag and drop columns
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); ((EXTREELib::IColumnPtr)(spTree1->GetColumns()->Add(L"C1")))->PutAllowDragging(VARIANT_FALSE); ((EXTREELib::IColumnPtr)(spTree1->GetColumns()->Add(L"C2")))->PutAllowDragging(VARIANT_FALSE);
205. How do I disable resizing a column at runtime
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); ((EXTREELib::IColumnPtr)(spTree1->GetColumns()->Add(L"Unsizable")))->PutAllowSizing(VARIANT_FALSE); spTree1->GetColumns()->Add(L"C2"); spTree1->GetColumns()->Add(L"C3"); spTree1->GetColumns()->Add(L"C4");
204. How can I align the column to the right, and its caption too
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); EXTREELib::IColumnPtr var_Column = ((EXTREELib::IColumnPtr)(spTree1->GetColumns()->Add(L"Column"))); var_Column->PutAlignment(EXTREELib::RightAlignment); var_Column->PutHeaderAlignment(EXTREELib::RightAlignment); spTree1->GetItems()->AddItem(long(0)); spTree1->GetItems()->AddItem(long(1));
203. How can I align the column to the right
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); ((EXTREELib::IColumnPtr)(spTree1->GetColumns()->Add(L"Column")))->PutAlignment(EXTREELib::RightAlignment); spTree1->GetItems()->AddItem(long(0)); spTree1->GetItems()->AddItem(long(1));
202. How do I change the column's caption
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); ((EXTREELib::IColumnPtr)(spTree1->GetColumns()->Add(L"Column")))->PutCaption(L"new caption");
201. Can I change the visual effect, appearance for the anchor, hyperlink elements, in HTML captions, after the user clicks it
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->PutFormatAnchor(VARIANT_FALSE,L"<b><u><fgcolor=880000> </fgcolor></u></b>"); spTree1->GetColumns()->Add(L"Column"); EXTREELib::IItemsPtr var_Items = spTree1->GetItems(); var_Items->PutCellCaptionFormat(var_Items->AddItem("Just an <a1>anchor</a> element ..."),long(0),EXTREELib::exHTML); EXTREELib::IItemsPtr var_Items1 = spTree1->GetItems(); var_Items1->PutCellCaptionFormat(var_Items1->AddItem("Just another <a2>anchor</a> element ..."),long(0),EXTREELib::exHTML); spTree1->GetItems()->AddItem("next item");
200. Can I change the visual effect, appearance for the anchor, hyperlink elements, in HTML captions
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->PutFormatAnchor(VARIANT_TRUE,L"<b><u><fgcolor=FF0000> </fgcolor></u></b>"); spTree1->GetColumns()->Add(L"Column"); EXTREELib::IItemsPtr var_Items = spTree1->GetItems(); var_Items->PutCellCaptionFormat(var_Items->AddItem("Just an <a1>anchor</a> element ..."),long(0),EXTREELib::exHTML); EXTREELib::IItemsPtr var_Items1 = spTree1->GetItems(); var_Items1->PutCellCaptionFormat(var_Items1->AddItem("Just another <a2>anchor</a> element ..."),long(0),EXTREELib::exHTML);
199. Can I change the font for the tooltip
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->PutToolTipDelay(1); spTree1->PutToolTipWidth(364); ((EXTREELib::IColumnPtr)(spTree1->GetColumns()->Add(L"tootip")))->PutToolTip(L"<br><font Tahoma;14>this</font> is a tooltip assigned to a column<br>");
198. Can I change the font for the tooltip
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->PutToolTipDelay(1); /* Copy and paste the following directives to your header file as it defines the namespace 'stdole' for the library: 'OLE Automation' #import <stdole2.tlb> */ stdole::FontPtr var_StdFont = spTree1->GetToolTipFont(); var_StdFont->PutName(L"Tahoma"); var_StdFont->PutSize(_variant_t(long(14))); spTree1->PutToolTipWidth(364); ((EXTREELib::IColumnPtr)(spTree1->GetColumns()->Add(L"tootip")))->PutToolTip(L"this is a tooltip assigned to a column");
197. Can I change the order of the buttons in the scroll bar
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->PutScrollOrderParts(EXTREELib::exHScroll,L"t,l,r"); spTree1->PutScrollOrderParts(EXTREELib::exVScroll,L"t,l,r"); spTree1->PutScrollBars(EXTREELib::exDisableBoth);
196. The thumb size seems to be very small. Can I make it bigger
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->PutColumnAutoResize(VARIANT_FALSE); ((EXTREELib::IColumnPtr)(spTree1->GetColumns()->Add(L"C1")))->PutWidth(256); ((EXTREELib::IColumnPtr)(spTree1->GetColumns()->Add(L"C2")))->PutWidth(256); ((EXTREELib::IColumnPtr)(spTree1->GetColumns()->Add(L"C3")))->PutWidth(256); spTree1->PutScrollThumbSize(EXTREELib::exHScroll,64);
195. How can I display my text on the scroll bar, using a different font
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->PutScrollPartCaption(EXTREELib::exHScroll,EXTREELib::exThumbPart,L"This is <s><font Tahoma;12> just </font></s> text"); spTree1->PutColumnAutoResize(VARIANT_FALSE); spTree1->PutScrollHeight(20); ((EXTREELib::IColumnPtr)(spTree1->GetColumns()->Add(L"C1")))->PutWidth(256); ((EXTREELib::IColumnPtr)(spTree1->GetColumns()->Add(L"C2")))->PutWidth(256); ((EXTREELib::IColumnPtr)(spTree1->GetColumns()->Add(L"C3")))->PutWidth(256);
194. How can I display my text on the scroll bar, using a different font
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->PutScrollPartCaption(EXTREELib::exHScroll,EXTREELib::exThumbPart,L"This is just a text"); spTree1->GetScrollFont(EXTREELib::exHScroll)->PutSize(_variant_t(long(12))); spTree1->PutColumnAutoResize(VARIANT_FALSE); spTree1->PutScrollHeight(20); ((EXTREELib::IColumnPtr)(spTree1->GetColumns()->Add(L"C1")))->PutWidth(256); ((EXTREELib::IColumnPtr)(spTree1->GetColumns()->Add(L"C2")))->PutWidth(256); ((EXTREELib::IColumnPtr)(spTree1->GetColumns()->Add(L"C3")))->PutWidth(256);
193. How can I display my text on the scroll bar
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->PutScrollPartCaption(EXTREELib::exHScroll,EXTREELib::exThumbPart,L"this is just a text"); spTree1->PutColumnAutoResize(VARIANT_FALSE); ((EXTREELib::IColumnPtr)(spTree1->GetColumns()->Add(L"C1")))->PutWidth(256); ((EXTREELib::IColumnPtr)(spTree1->GetColumns()->Add(L"C2")))->PutWidth(256); ((EXTREELib::IColumnPtr)(spTree1->GetColumns()->Add(L"C3")))->PutWidth(256);
192. How do I enlarge or change the size of the control's scrollbars
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->PutScrollHeight(18); spTree1->PutScrollWidth(18); spTree1->PutScrollButtonWidth(18); spTree1->PutScrollButtonHeight(18); spTree1->PutScrollBars(EXTREELib::exDisableBoth);
191. How do I assign a tooltip to a scrollbar
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->PutScrollToolTip(EXTREELib::exHScroll,L"This is a tooltip being shown when you click and drag the thumb in the horizontal scroll bar"); spTree1->PutColumnAutoResize(VARIANT_FALSE); ((EXTREELib::IColumnPtr)(spTree1->GetColumns()->Add(L"C1")))->PutWidth(256); ((EXTREELib::IColumnPtr)(spTree1->GetColumns()->Add(L"C2")))->PutWidth(256); ((EXTREELib::IColumnPtr)(spTree1->GetColumns()->Add(L"C3")))->PutWidth(256);
190. How do I assign an icon to the button in the scrollbar
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->Images(_bstr_t("gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0") + "/oFBoVDolFo1HpFJpVLplNp1PqFRqVTqlVq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1" + "/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m0ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qO" + "x3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/y" + "NAOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA="); spTree1->PutScrollPartVisible(EXTREELib::exHScroll,EXTREELib::exLeftB1Part,VARIANT_TRUE); spTree1->PutScrollPartCaption(EXTREELib::exHScroll,EXTREELib::exLeftB1Part,L"<img>1</img>"); spTree1->PutScrollHeight(18); spTree1->PutScrollButtonWidth(18); spTree1->PutScrollBars(EXTREELib::exDisableNoHorizontal);
189. I need to add a button in the scroll bar. Is this possible
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->PutScrollPartVisible(EXTREELib::exHScroll,EXTREELib::exLeftB1Part,VARIANT_TRUE); spTree1->PutScrollPartCaption(EXTREELib::exHScroll,EXTREELib::exLeftB1Part,L"1"); spTree1->PutScrollBars(EXTREELib::exDisableNoHorizontal);
188. Can I display an additional buttons in the scroll bar
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->PutScrollPartVisible(EXTREELib::exHScroll,EXTREELib::exLeftB1Part,VARIANT_TRUE); spTree1->PutScrollPartVisible(EXTREELib::exHScroll,EXTREELib::exLeftB2Part,VARIANT_TRUE); spTree1->PutScrollPartVisible(EXTREELib::exHScroll,EXTREELib::exRightB6Part,VARIANT_TRUE); spTree1->PutScrollPartVisible(EXTREELib::exHScroll,EXTREELib::exRightB5Part,VARIANT_TRUE); spTree1->PutScrollBars(EXTREELib::exDisableNoHorizontal);
187. Can I display the picture aligned to the right, while the text aligned to the left
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->PutDefaultItemHeight(48); spTree1->GetColumns()->Add(L"C1"); EXTREELib::IItemsPtr var_Items = spTree1->GetItems(); _variant_t s = var_Items->GetSplitCell(var_Items->AddItem("Text"),long(0)); var_Items->PutCellPicture(long(0),s,((IDispatch*)(spTree1->ExecuteTemplate("loadpicture(`c:\\exontrol\\images\\zipdisk.gif`)")))); var_Items->PutCellHAlignment(long(0),s,EXTREELib::RightAlignment);
186. How can I display a custom size picture to a cell or item
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->PutDefaultItemHeight(48); spTree1->GetColumns()->Add(L"C1"); EXTREELib::IItemsPtr var_Items = spTree1->GetItems(); var_Items->PutCellPicture(var_Items->AddItem("Text"),long(0),((IDispatch*)(spTree1->ExecuteTemplate("loadpicture(`c:\\exontrol\\images\\zipdisk.gif`)"))));
185. How can I display a multiple pictures to a cell or item
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->PutDefaultItemHeight(48); spTree1->PutHTMLPicture(L"pic1","c:\\exontrol\\images\\zipdisk.gif"); spTree1->PutHTMLPicture(L"pic2","c:\\exontrol\\images\\auction.gif"); spTree1->GetColumns()->Add(L"C1"); EXTREELib::IItemsPtr var_Items = spTree1->GetItems(); var_Items->PutCellCaptionFormat(var_Items->AddItem("<img>pic1</img> Text <img>pic2</img> another text ..."),long(0),EXTREELib::exHTML);
184. How do I change the column's foreground color for numbers between an interval - Range
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); EXTREELib::IConditionalFormatPtr var_ConditionalFormat = spTree1->GetConditionalFormats()->Add(L"%0 >= 2 and %0 <= 10",vtMissing); var_ConditionalFormat->PutBold(VARIANT_TRUE); var_ConditionalFormat->PutForeColor(RGB(255,0,0)); var_ConditionalFormat->PutApplyTo(EXTREELib::FormatApplyToEnum(0x1)); spTree1->GetColumns()->Add(L"N1"); spTree1->GetColumns()->Add(L"N2"); EXTREELib::IItemsPtr var_Items = spTree1->GetItems(); var_Items->PutCellCaption(var_Items->AddItem(long(1)),long(1),long(2)); EXTREELib::IItemsPtr var_Items1 = spTree1->GetItems(); var_Items1->PutCellCaption(var_Items1->AddItem(long(3)),long(1),long(3)); EXTREELib::IItemsPtr var_Items2 = spTree1->GetItems(); var_Items2->PutCellCaption(var_Items2->AddItem(long(10)),long(1),long(11)); EXTREELib::IItemsPtr var_Items3 = spTree1->GetItems(); var_Items3->PutCellCaption(var_Items3->AddItem(long(13)),long(1),long(31)); spTree1->PutSearchColumnIndex(1);
183. How do I change the item's foreground color for numbers between an interval - Range
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->GetConditionalFormats()->Add(L"%0 >= 2 and %0 <= 10",vtMissing)->PutForeColor(RGB(255,0,0)); spTree1->GetColumns()->Add(L"Numbers"); spTree1->GetItems()->AddItem(long(1)); spTree1->GetItems()->AddItem(long(2)); spTree1->GetItems()->AddItem(long(10)); spTree1->GetItems()->AddItem(long(20));
182. How do I change the item's background color for numbers less than a value
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->GetConditionalFormats()->Add(L"%0 < 10",vtMissing)->PutBackColor(RGB(255,0,0)); spTree1->GetColumns()->Add(L"Numbers"); spTree1->GetItems()->AddItem(long(1)); spTree1->GetItems()->AddItem(long(2)); spTree1->GetItems()->AddItem(long(10)); spTree1->GetItems()->AddItem(long(20));
181. How do I underline the numbers greater than a value
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->GetConditionalFormats()->Add(L"%0 >= 10",vtMissing)->PutUnderline(VARIANT_TRUE); spTree1->GetColumns()->Add(L"Numbers"); spTree1->GetItems()->AddItem(long(1)); spTree1->GetItems()->AddItem(long(2)); spTree1->GetItems()->AddItem(long(10)); spTree1->GetItems()->AddItem(long(20));
180. How do I highlight in italic the numbers greater than a value
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->GetConditionalFormats()->Add(L"%0 >= 10",vtMissing)->PutStrikeOut(VARIANT_TRUE); spTree1->GetColumns()->Add(L"Numbers"); spTree1->GetItems()->AddItem(long(1)); spTree1->GetItems()->AddItem(long(2)); spTree1->GetItems()->AddItem(long(10)); spTree1->GetItems()->AddItem(long(20));
179. How do I highlight in italic the numbers greater than a value
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->GetConditionalFormats()->Add(L"%0 >= 10",vtMissing)->PutItalic(VARIANT_TRUE); spTree1->GetColumns()->Add(L"Numbers"); spTree1->GetItems()->AddItem(long(1)); spTree1->GetItems()->AddItem(long(2)); spTree1->GetItems()->AddItem(long(10)); spTree1->GetItems()->AddItem(long(20));
178. How do I highlight in bold the numbers greater than a value
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->GetConditionalFormats()->Add(L"%0 >= 10",vtMissing)->PutBold(VARIANT_TRUE); spTree1->GetColumns()->Add(L"Numbers"); spTree1->GetItems()->AddItem(long(1)); spTree1->GetItems()->AddItem(long(2)); spTree1->GetItems()->AddItem(long(10)); spTree1->GetItems()->AddItem(long(20));
177. Can I use your EBN files to change the visual appearance for +/- expand - collapse buttons
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->GetVisualAppearance()->Add(1,"c:\\exontrol\\images\\normal.ebn"); spTree1->GetVisualAppearance()->Add(2,"c:\\exontrol\\images\\pushed.ebn"); spTree1->PutLinesAtRoot(EXTREELib::exGroupLinesAtRoot); spTree1->PutHasButtons(EXTREELib::exCustom); spTree1->PutHasButtonsCustom(VARIANT_FALSE,16777216); spTree1->PutHasButtonsCustom(VARIANT_TRUE,33554432); spTree1->GetColumns()->Add(L"Column"); EXTREELib::IItemsPtr var_Items = spTree1->GetItems(); long h = var_Items->AddItem("Root 1"); var_Items->InsertItem(h,long(0),"Child 1"); var_Items->InsertItem(h,long(0),"Child 2"); var_Items->PutExpandItem(h,VARIANT_TRUE); h = var_Items->AddItem("Root 2"); var_Items->InsertItem(h,long(0),"Child");
176. Can I use your EBN files to change the visual appearance for radio buttons
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->GetVisualAppearance()->Add(1,"c:\\exontrol\\images\\normal.ebn"); spTree1->GetVisualAppearance()->Add(2,"c:\\exontrol\\images\\pushed.ebn"); spTree1->PutRadioImage(VARIANT_FALSE,16777216); spTree1->PutRadioImage(VARIANT_TRUE,33554432); ((EXTREELib::IColumnPtr)(spTree1->GetColumns()->Add(L"Radio")))->PutDef(EXTREELib::exCellHasRadioButton,VARIANT_TRUE); EXTREELib::IItemsPtr var_Items = spTree1->GetItems(); var_Items->AddItem("Radio 1"); var_Items->PutCellState(var_Items->AddItem("Radio 2"),long(0),1); var_Items->AddItem("Radio 3");
175. Can I use your EBN files to change the visual appearance for checkbox cells
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->GetVisualAppearance()->Add(1,"c:\\exontrol\\images\\normal.ebn"); spTree1->GetVisualAppearance()->Add(2,"c:\\exontrol\\images\\pushed.ebn"); spTree1->PutCheckImage(EXTREELib::Unchecked,16777216); spTree1->PutCheckImage(EXTREELib::Checked,33554432); ((EXTREELib::IColumnPtr)(spTree1->GetColumns()->Add(L"Check")))->PutDef(EXTREELib::exCellHasCheckBox,VARIANT_TRUE); EXTREELib::IItemsPtr var_Items = spTree1->GetItems(); var_Items->AddItem("Check 1"); var_Items->PutCellState(var_Items->AddItem("Check 2"),long(0),1);
174. How do I change the visual aspect for thumb parts in the scroll bars, using EBN
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->GetVisualAppearance()->Add(1,"c:\\exontrol\\images\\normal.ebn"); spTree1->GetVisualAppearance()->Add(2,"c:\\exontrol\\images\\pushed.ebn"); spTree1->GetVisualAppearance()->Add(3,"c:\\exontrol\\images\\hot.ebn"); spTree1->PutBackground(EXTREELib::exHSThumb,0x1000000); spTree1->PutBackground(EXTREELib::exHSThumbP,0x2000000); spTree1->PutBackground(EXTREELib::exHSThumbH,0x3000000); spTree1->PutBackground(EXTREELib::exVSThumb,0x1000000); spTree1->PutBackground(EXTREELib::exVSThumbP,0x2000000); spTree1->PutBackground(EXTREELib::exVSThumbH,0x3000000); spTree1->PutColumnAutoResize(VARIANT_FALSE); spTree1->PutScrollBySingleLine(VARIANT_TRUE); ((EXTREELib::IColumnPtr)(spTree1->GetColumns()->Add(L"S")))->PutWidth(483); EXTREELib::IItemsPtr var_Items = spTree1->GetItems(); var_Items->PutItemHeight(var_Items->AddItem("Item 1"),248); spTree1->GetItems()->AddItem("Item 2");
173. How do I change the visual aspect only for the thumb in the scroll bar, using EBN
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->GetVisualAppearance()->Add(1,"c:\\exontrol\\images\\normal.ebn"); spTree1->GetVisualAppearance()->Add(2,"c:\\exontrol\\images\\pushed.ebn"); spTree1->GetVisualAppearance()->Add(3,"c:\\exontrol\\images\\hot.ebn"); spTree1->PutBackground(EXTREELib::exHSThumb,0x1000000); spTree1->PutBackground(EXTREELib::exHSThumbP,0x2000000); spTree1->PutBackground(EXTREELib::exHSThumbH,0x3000000); spTree1->PutColumnAutoResize(VARIANT_FALSE); ((EXTREELib::IColumnPtr)(spTree1->GetColumns()->Add(L"S")))->PutWidth(483);
172. I've seen that you can change the visual appearance for the scroll bar. How can I do that
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->GetVisualAppearance()->Add(1,"c:\\exontrol\\images\\normal.ebn"); spTree1->GetVisualAppearance()->Add(2,"c:\\exontrol\\images\\pushed.ebn"); spTree1->GetVisualAppearance()->Add(3,"c:\\exontrol\\images\\hot.ebn"); spTree1->PutBackground(EXTREELib::exSBtn,0x1000000); spTree1->PutBackground(EXTREELib::exSBtnP,0x2000000); spTree1->PutBackground(EXTREELib::exSBtnH,0x3000000); spTree1->PutBackground(EXTREELib::exHSBack,RGB(240,240,240)); spTree1->PutBackground(EXTREELib::exVSBack,RGB(240,240,240)); spTree1->PutBackground(EXTREELib::exScrollSizeGrip,RGB(240,240,240)); ((EXTREELib::IColumnPtr)(spTree1->GetColumns()->Add(L"S")))->PutWidth(32); ((EXTREELib::IColumnPtr)(spTree1->GetColumns()->Add(L"Level 1")))->PutLevelKey(long(1)); ((EXTREELib::IColumnPtr)(spTree1->GetColumns()->Add(L"Level 2")))->PutLevelKey(long(1)); ((EXTREELib::IColumnPtr)(spTree1->GetColumns()->Add(L"Level 3")))->PutLevelKey(long(1)); ((EXTREELib::IColumnPtr)(spTree1->GetColumns()->Add(L"E1")))->PutWidth(32); ((EXTREELib::IColumnPtr)(spTree1->GetColumns()->Add(L"E2")))->PutWidth(32); ((EXTREELib::IColumnPtr)(spTree1->GetColumns()->Add(L"E3")))->PutWidth(32); ((EXTREELib::IColumnPtr)(spTree1->GetColumns()->Add(L"E4")))->PutWidth(32); spTree1->PutColumnAutoResize(VARIANT_FALSE); spTree1->PutScrollBars(EXTREELib::exDisableBoth);
171. Is there any option to highligth the column from the cursor - point
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->GetVisualAppearance()->Add(1,"c:\\exontrol\\images\\normal.ebn"); spTree1->PutBackground(EXTREELib::exCursorHoverColumn,0x1000000); ((EXTREELib::IColumnPtr)(spTree1->GetColumns()->Add(L"S")))->PutWidth(32); ((EXTREELib::IColumnPtr)(spTree1->GetColumns()->Add(L"Level 1")))->PutLevelKey(long(1)); ((EXTREELib::IColumnPtr)(spTree1->GetColumns()->Add(L"Level 2")))->PutLevelKey(long(1)); ((EXTREELib::IColumnPtr)(spTree1->GetColumns()->Add(L"Level 3")))->PutLevelKey(long(1)); ((EXTREELib::IColumnPtr)(spTree1->GetColumns()->Add(L"E1")))->PutWidth(32); ((EXTREELib::IColumnPtr)(spTree1->GetColumns()->Add(L"E2")))->PutWidth(32); ((EXTREELib::IColumnPtr)(spTree1->GetColumns()->Add(L"E3")))->PutWidth(32); ((EXTREELib::IColumnPtr)(spTree1->GetColumns()->Add(L"E4")))->PutWidth(32);
170. How do I change the visual aspect of selected item in the drop down filter window, using your EBN technology
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->GetVisualAppearance()->Add(1,"c:\\exontrol\\images\\normal.ebn"); spTree1->PutBackground(EXTREELib::exSelBackColorFilter,0x1000000); spTree1->PutBackground(EXTREELib::exSelForeColorFilter,RGB(255,20,20)); ((EXTREELib::IColumnPtr)(spTree1->GetColumns()->Add(L"Filter")))->PutDisplayFilterButton(VARIANT_TRUE);
169. How do I change the visual aspect of the drop down calendar window, that shows up if I click the drop down filter button, using EBN
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->GetVisualAppearance()->Add(1,"c:\\exontrol\\images\\normal.ebn"); spTree1->GetVisualAppearance()->Add(2,"c:\\exontrol\\images\\pushed.ebn"); spTree1->PutBackground(EXTREELib::exDateHeader,0x1000000); spTree1->PutBackground(EXTREELib::exDateTodayUp,0x1000000); spTree1->PutBackground(EXTREELib::exDateTodayDown,0x2000000); spTree1->PutBackground(EXTREELib::exDateScrollThumb,0x1000000); spTree1->PutBackground(EXTREELib::exDateScrollRange,RGB(230,230,230)); spTree1->PutBackground(EXTREELib::exDateSeparatorBar,RGB(230,230,230)); spTree1->PutBackground(EXTREELib::exDateSelect,0x1000000); EXTREELib::IColumnPtr var_Column = ((EXTREELib::IColumnPtr)(spTree1->GetColumns()->Add(L"Date"))); var_Column->PutFilterType(EXTREELib::exDate); var_Column->PutDisplayFilterButton(VARIANT_TRUE); var_Column->PutDisplayFilterDate(VARIANT_TRUE);
168. How do I change the visual aspect of the close button in the filter bar, using EBN
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->GetVisualAppearance()->Add(1,"c:\\exontrol\\images\\normal.ebn"); spTree1->PutBackground(EXTREELib::exFooterFilterBarButton,0x1000000); ((EXTREELib::IColumnPtr)(spTree1->GetColumns()->Add(L"Filter")))->PutFilterType(EXTREELib::exBlanks); spTree1->ApplyFilter();
167. How do I change the visual aspect of buttons in the cell, using EBN
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->GetVisualAppearance()->Add(1,"c:\\exontrol\\images\\normal.ebn"); spTree1->GetVisualAppearance()->Add(2,"c:\\exontrol\\images\\pushed.ebn"); spTree1->PutBackground(EXTREELib::exCellButtonUp,0x1000000); spTree1->PutBackground(EXTREELib::exCellButtonDown,0x2000000); spTree1->PutSelForeColor(RGB(0,0,0)); spTree1->PutShowFocusRect(VARIANT_FALSE); ((EXTREELib::IColumnPtr)(spTree1->GetColumns()->Add(L"Column 1")))->PutDef(EXTREELib::exCellHasButton,VARIANT_TRUE); spTree1->GetItems()->AddItem("Button 1"); spTree1->GetItems()->AddItem("Button 2"); spTree1->GetColumns()->Add(L"Column 2");
166. How do I change the visual aspect of the drop down filter button, using EBN
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->GetVisualAppearance()->Add(1,"c:\\exontrol\\images\\normal.ebn"); spTree1->PutBackground(EXTREELib::exHeaderFilterBarButton,0x1000000); ((EXTREELib::IColumnPtr)(spTree1->GetColumns()->Add(L"Filter")))->PutDisplayFilterButton(VARIANT_TRUE);
165. Is there any function to get the control's data in your x-script format / template
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->GetColumns()->Add(L"Column"); spTree1->GetItems()->AddItem(long(0));
164. How do I enable resizing the columns at runtime
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->PutColumnsAllowSizing(VARIANT_TRUE); spTree1->PutMarkSearchColumn(VARIANT_FALSE); spTree1->PutHeaderVisible(VARIANT_FALSE); spTree1->GetColumns()->Add(L"Column 1"); spTree1->GetColumns()->Add(L"Column 2"); spTree1->PutDrawGridLines(EXTREELib::exVLines); EXTREELib::IItemsPtr var_Items = spTree1->GetItems(); var_Items->PutCellCaption(var_Items->AddItem("Item 1"),long(1),"Sub Item 1"); EXTREELib::IItemsPtr var_Items1 = spTree1->GetItems(); var_Items1->PutCellCaption(var_Items1->AddItem("Item 2"),long(1),"Sub Item 2");
163. How can I select the second inner column when spliting the cells
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->PutSelectColumnInner(1); spTree1->PutFullRowSelect(VARIANT_FALSE); spTree1->PutDrawGridLines(EXTREELib::exAllLines); spTree1->GetColumns()->Add(L"Column"); EXTREELib::IItemsPtr var_Items = spTree1->GetItems(); var_Items->PutCellCaption(long(0),var_Items->GetSplitCell(var_Items->AddItem("Split Cell 1.1"),long(0)),"Split Cell 2.1"); var_Items->PutCellCaption(long(0),var_Items->GetSplitCell(var_Items->AddItem("Split Cell 1.2"),long(0)),"Split Cell 2.2"); var_Items->PutSelectItem(var_Items->GetFirstVisibleItem(),VARIANT_TRUE);
162. How can I sort by multiple columns
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->PutSingleSort(VARIANT_FALSE); ((EXTREELib::IColumnPtr)(spTree1->GetColumns()->Add(L"C1")))->PutSortOrder(EXTREELib::SortAscending); ((EXTREELib::IColumnPtr)(spTree1->GetColumns()->Add(L"C2")))->PutSortOrder(EXTREELib::SortDescending); ((EXTREELib::IColumnPtr)(spTree1->GetColumns()->Add(L"C3")))->PutSortOrder(EXTREELib::SortAscending);
161. How can I add several columns to control's sort bar
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->PutSortBarVisible(VARIANT_TRUE); spTree1->PutSortBarColumnWidth(48); ((EXTREELib::IColumnPtr)(spTree1->GetColumns()->Add(L"C1")))->PutSortOrder(EXTREELib::SortAscending); ((EXTREELib::IColumnPtr)(spTree1->GetColumns()->Add(L"C2")))->PutSortOrder(EXTREELib::SortDescending);
160. How can I change the width of the columns being displayed in the sort bar
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->PutSortBarVisible(VARIANT_TRUE); spTree1->PutSortBarColumnWidth(48); ((EXTREELib::IColumnPtr)(spTree1->GetColumns()->Add(L"C1")))->PutSortOrder(EXTREELib::SortAscending); ((EXTREELib::IColumnPtr)(spTree1->GetColumns()->Add(L"C2")))->PutSortOrder(EXTREELib::SortDescending);
159. How can I change the height of the sort bar's
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->PutSortBarVisible(VARIANT_TRUE); spTree1->PutSortBarHeight(48);
158. How can I change the sort bar's foreground color
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->PutSortBarVisible(VARIANT_TRUE); spTree1->PutForeColorSortBar(RGB(255,0,0));
157. How can I change the visual appearance of the control's sort bar, using EBN files
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->GetVisualAppearance()->Add(1,"c:\\exontrol\\images\\normal.ebn"); spTree1->GetVisualAppearance()->Add(2,"c:\\exontrol\\images\\pushed.ebn"); spTree1->PutSortBarVisible(VARIANT_TRUE); spTree1->PutBackColorSortBar(0x1000000); spTree1->PutBackColorSortBarCaption(0x2000000); spTree1->PutAppearance(EXTREELib::None2);
156. How can I change the sort bar's background color
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->PutSortBarVisible(VARIANT_TRUE); spTree1->PutBackColorSortBar(RGB(255,0,0)); spTree1->PutBackColorSortBarCaption(RGB(128,0,0));
155. How can I change the default caption being displayed in the control's sort bar
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->PutSortBarVisible(VARIANT_TRUE); spTree1->PutSortBarCaption(L"new caption");
154. How can I show the locked / fixed items on the bottom side of the control
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->PutShowLockedItems(VARIANT_TRUE); spTree1->GetColumns()->Add(L"Column"); EXTREELib::IItemsPtr var_Items = spTree1->GetItems(); var_Items->PutLockedItemCount(EXTREELib::MiddleAlignment,2); var_Items->PutCellCaption(var_Items->GetLockedItem(EXTREELib::MiddleAlignment,0),long(0),"locked item 1"); var_Items->PutCellCaption(var_Items->GetLockedItem(EXTREELib::MiddleAlignment,1),long(0),"locked item 2"); var_Items->AddItem("un-locked item");
153. How can I show the locked / fixed items
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->PutShowLockedItems(VARIANT_TRUE); spTree1->GetColumns()->Add(L"Column"); EXTREELib::IItemsPtr var_Items = spTree1->GetItems(); var_Items->PutLockedItemCount(EXTREELib::TopAlignment,2); var_Items->PutCellCaption(var_Items->GetLockedItem(EXTREELib::TopAlignment,0),long(0),"locked item 1"); var_Items->PutCellCaption(var_Items->GetLockedItem(EXTREELib::TopAlignment,1),long(0),"locked item 2"); var_Items->AddItem("un-locked item");
152. How can I hide the locked / fixed items
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->PutShowLockedItems(VARIANT_FALSE); spTree1->GetColumns()->Add(L"Column"); EXTREELib::IItemsPtr var_Items = spTree1->GetItems(); var_Items->PutLockedItemCount(EXTREELib::TopAlignment,1); var_Items->PutCellCaption(var_Items->GetLockedItem(EXTREELib::TopAlignment,0),long(0),"locked item"); var_Items->AddItem("un-locked item");
151. How can I show the control's sort bar
/*
Copy and paste the following directives to your header file as
it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library'
#import <ExTree.dll>
using namespace EXTREELib;
*/
EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown();
spTree1->PutSortBarVisible(VARIANT_TRUE);
150. How can I stretch a picture on the control's header, when multiple levels are displayed, so it is not tiled
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->PutPictureLevelHeader(IPictureDispPtr(((IDispatch*)(spTree1->ExecuteTemplate("loadpicture(`c:\\exontrol\\images\\colorize.gif`)"))))); spTree1->PutPictureDisplayLevelHeader(EXTREELib::Stretch); ((EXTREELib::IColumnPtr)(spTree1->GetColumns()->Add(L"S")))->PutWidth(32); ((EXTREELib::IColumnPtr)(spTree1->GetColumns()->Add(L"Level 1")))->PutLevelKey(long(1)); ((EXTREELib::IColumnPtr)(spTree1->GetColumns()->Add(L"Level 2")))->PutLevelKey(long(1)); ((EXTREELib::IColumnPtr)(spTree1->GetColumns()->Add(L"Level 3")))->PutLevelKey(long(1)); ((EXTREELib::IColumnPtr)(spTree1->GetColumns()->Add(L"E1")))->PutWidth(32); ((EXTREELib::IColumnPtr)(spTree1->GetColumns()->Add(L"E2")))->PutWidth(32); ((EXTREELib::IColumnPtr)(spTree1->GetColumns()->Add(L"E3")))->PutWidth(32); ((EXTREELib::IColumnPtr)(spTree1->GetColumns()->Add(L"E4")))->PutWidth(32);
149. How can I display a picture on the control's header, when multiple levels are displayed, so it is not tiled
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->PutPictureLevelHeader(IPictureDispPtr(((IDispatch*)(spTree1->ExecuteTemplate("loadpicture(`c:\\exontrol\\images\\colorize.gif`)"))))); spTree1->PutPictureDisplayLevelHeader(EXTREELib::MiddleRight); ((EXTREELib::IColumnPtr)(spTree1->GetColumns()->Add(L"S")))->PutWidth(32); ((EXTREELib::IColumnPtr)(spTree1->GetColumns()->Add(L"Level 1")))->PutLevelKey(long(1)); ((EXTREELib::IColumnPtr)(spTree1->GetColumns()->Add(L"Level 2")))->PutLevelKey(long(1)); ((EXTREELib::IColumnPtr)(spTree1->GetColumns()->Add(L"Level 3")))->PutLevelKey(long(1)); ((EXTREELib::IColumnPtr)(spTree1->GetColumns()->Add(L"E")))->PutWidth(32);
148. How can I display a picture on the control's header, when multiple levels are displayed
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->PutPictureLevelHeader(IPictureDispPtr(((IDispatch*)(spTree1->ExecuteTemplate("loadpicture(`c:\\exontrol\\images\\zipdisk.gif`)"))))); ((EXTREELib::IColumnPtr)(spTree1->GetColumns()->Add(L"S")))->PutWidth(32); ((EXTREELib::IColumnPtr)(spTree1->GetColumns()->Add(L"Level 1")))->PutLevelKey(long(1)); ((EXTREELib::IColumnPtr)(spTree1->GetColumns()->Add(L"Level 2")))->PutLevelKey(long(1)); ((EXTREELib::IColumnPtr)(spTree1->GetColumns()->Add(L"Level 3")))->PutLevelKey(long(1));
147. How can I change the header's background color, when multiple levels are displayed
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->PutBackColorLevelHeader(RGB(250,0,0)); ((EXTREELib::IColumnPtr)(spTree1->GetColumns()->Add(L"S")))->PutWidth(32); ((EXTREELib::IColumnPtr)(spTree1->GetColumns()->Add(L"Level 1")))->PutLevelKey(long(1)); ((EXTREELib::IColumnPtr)(spTree1->GetColumns()->Add(L"Level 2")))->PutLevelKey(long(1)); ((EXTREELib::IColumnPtr)(spTree1->GetColumns()->Add(L"Level 3")))->PutLevelKey(long(1));
146. Can I programmatically scroll the control
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->GetColumns()->Add(L"Column"); spTree1->GetItems()->AddItem(long(0)); spTree1->GetItems()->AddItem(long(1)); spTree1->GetItems()->AddItem(long(2)); spTree1->GetItems()->AddItem(long(3)); spTree1->PutItems(spTree1->GetItems(long(0)),vtMissing); spTree1->PutItems(spTree1->GetItems(long(0)),vtMissing); spTree1->PutScrollPos(VARIANT_TRUE,1);
145. How do I disable expanding or collapsing an item when user presses the arrow keys
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->PutExpandOnKeys(VARIANT_FALSE); spTree1->PutLinesAtRoot(EXTREELib::exLinesAtRoot); spTree1->GetColumns()->Add(L"Column 1"); EXTREELib::IItemsPtr var_Items = spTree1->GetItems(); long h = var_Items->AddItem("Root"); var_Items->InsertItem(h,long(0),"Child 1"); var_Items->InsertItem(h,long(0),"Child 2"); var_Items->PutExpandItem(h,VARIANT_TRUE);
144. How do I expand automatically the items while user types characters to searching for something ( incremental searching )
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->PutExpandOnSearch(VARIANT_TRUE); spTree1->PutLinesAtRoot(EXTREELib::exLinesAtRoot); spTree1->PutAutoSearch(VARIANT_TRUE); ((EXTREELib::IColumnPtr)(spTree1->GetColumns()->Add(L"Column")))->PutAutoSearch(EXTREELib::exContains); EXTREELib::IItemsPtr var_Items = spTree1->GetItems(); var_Items->InsertItem(var_Items->InsertItem(var_Items->AddItem("text"),long(0),"some text"),long(0),"another text"); var_Items->InsertItem(var_Items->InsertItem(var_Items->AddItem("text"),long(0),"some text"),long(0),"another text");
143. Can I programmatically scroll the control
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->GetColumns()->Add(L"Column"); spTree1->GetItems()->AddItem(long(0)); spTree1->GetItems()->AddItem(long(1)); spTree1->GetItems()->AddItem(long(2)); spTree1->GetItems()->AddItem(long(3)); spTree1->PutItems(spTree1->GetItems(long(0)),vtMissing); spTree1->PutItems(spTree1->GetItems(long(0)),vtMissing); spTree1->Scroll(EXTREELib::exScrollDown,vtMissing);
142. Do you have some function to load data from a safe array
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->GetColumns()->Add(L"Column"); spTree1->GetItems()->AddItem(long(0)); spTree1->PutItems(spTree1->GetItems(long(0)),vtMissing);
141. Do you have some function to retrieve all items to a safe array
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->GetColumns()->Add(L"Column"); spTree1->GetItems()->AddItem(long(0)); spTree1->PutItems(spTree1->GetItems(long(0)),vtMissing); spTree1->GetItems()->AddItem(long(1)); spTree1->PutItems(spTree1->GetItems(long(0)),vtMissing); spTree1->GetItems()->AddItem(long(2)); spTree1->PutItems(spTree1->GetItems(long(0)),vtMissing); spTree1->GetItems()->AddItem(long(3));
140. How can still display the selected items when the control loses the focus
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->PutHideSelection(VARIANT_FALSE); spTree1->GetColumns()->Add(L"Column"); EXTREELib::IItemsPtr var_Items = spTree1->GetItems(); var_Items->AddItem("Item 3"); var_Items->AddItem("Item 1"); var_Items->PutSelectItem(var_Items->AddItem("Item 2"),VARIANT_TRUE);
139. How can I hide a column
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); ((EXTREELib::IColumnPtr)(spTree1->GetColumns()->Add(L"Hidden")))->PutVisible(VARIANT_FALSE); spTree1->GetColumns()->Add(L"2"); spTree1->GetColumns()->Add(L"3"); spTree1->GetColumns()->Add(L"4"); spTree1->GetColumns()->Add(L"5");
138. How can I ensure that a column is visible and fits the control's client area
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->PutColumnAutoResize(VARIANT_FALSE); ((EXTREELib::IColumnPtr)(spTree1->GetColumns()->Add(L"1")))->PutWidth(128); ((EXTREELib::IColumnPtr)(spTree1->GetColumns()->Add(L"2")))->PutWidth(128); ((EXTREELib::IColumnPtr)(spTree1->GetColumns()->Add(L"3")))->PutWidth(128); ((EXTREELib::IColumnPtr)(spTree1->GetColumns()->Add(L"4")))->PutWidth(128); ((EXTREELib::IColumnPtr)(spTree1->GetColumns()->Add(L"5")))->PutWidth(128); spTree1->EnsureVisibleColumn("5");
137. I've seen that the width of the tooltip is variable. Can I make it larger
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->PutToolTipWidth(328); ((EXTREELib::IColumnPtr)(spTree1->GetColumns()->Add(L"tootip")))->PutToolTip(L"this is a tooltip that should be very very very very very very very long");
136. How do I disable showing the tooltip for all control
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->PutToolTipDelay(0); ((EXTREELib::IColumnPtr)(spTree1->GetColumns()->Add(L"tootip")))->PutToolTip(L"this is a tooltip assigned to a column");
135. How do I let the tooltip being displayed longer
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->PutToolTipPopDelay(10000); ((EXTREELib::IColumnPtr)(spTree1->GetColumns()->Add(L"tootip")))->PutToolTip(L"this is a tooltip assigned to a column");
134. How do I show the tooltip quicker
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->PutToolTipDelay(1); ((EXTREELib::IColumnPtr)(spTree1->GetColumns()->Add(L"tootip")))->PutToolTip(L"this is a tooltip assigned to a column");
133. How do I change the caption being displayed in the control's filter bar
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->PutFilterBarCaption(L"your filter caption"); EXTREELib::IColumnPtr var_Column = ((EXTREELib::IColumnPtr)(spTree1->GetColumns()->Add(L"Column"))); var_Column->PutDisplayFilterButton(VARIANT_TRUE); var_Column->PutFilterType(EXTREELib::exBlanks); spTree1->ApplyFilter();
132. How do I disable expanding or collapsing an item when user double clicks it
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->PutExpandOnDblClick(VARIANT_FALSE); spTree1->PutLinesAtRoot(EXTREELib::exLinesAtRoot); spTree1->PutIndent(13); spTree1->GetColumns()->Add(L"Column 1"); EXTREELib::IItemsPtr var_Items = spTree1->GetItems(); long h = var_Items->AddItem("Root"); var_Items->InsertItem(h,long(0),"Child 1"); var_Items->InsertItem(h,long(0),"Child 2"); var_Items->PutExpandItem(h,VARIANT_TRUE);
131. How do I search case sensitive, using your incremental search feature
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->PutAutoSearch(VARIANT_TRUE); spTree1->PutASCIILower(L""); EXTREELib::IColumnsPtr var_Columns = spTree1->GetColumns(); ((EXTREELib::IColumnPtr)(var_Columns->Add(L"exStartWith")))->PutAutoSearch(EXTREELib::exStartWith); ((EXTREELib::IColumnPtr)(var_Columns->Add(L"exContains")))->PutAutoSearch(EXTREELib::exContains); EXTREELib::IItemsPtr var_Items = spTree1->GetItems(); var_Items->PutCellCaption(var_Items->AddItem("text"),long(1),"another text"); EXTREELib::IItemsPtr var_Items1 = spTree1->GetItems(); var_Items1->PutCellCaption(var_Items1->AddItem("text"),long(1),"another text");
130. How do I disable the control
/*
Copy and paste the following directives to your header file as
it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library'
#import <ExTree.dll>
using namespace EXTREELib;
*/
EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown();
spTree1->PutEnabled(VARIANT_FALSE);
129. How do I enable the incremental search feature within a column
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->PutAutoSearch(VARIANT_TRUE); EXTREELib::IColumnsPtr var_Columns = spTree1->GetColumns(); ((EXTREELib::IColumnPtr)(var_Columns->Add(L"exStartWith")))->PutAutoSearch(EXTREELib::exStartWith); ((EXTREELib::IColumnPtr)(var_Columns->Add(L"exContains")))->PutAutoSearch(EXTREELib::exContains); EXTREELib::IItemsPtr var_Items = spTree1->GetItems(); var_Items->PutCellCaption(var_Items->AddItem("text"),long(1),"another text"); EXTREELib::IItemsPtr var_Items1 = spTree1->GetItems(); var_Items1->PutCellCaption(var_Items1->AddItem("text"),long(1),"another text");
128. How do I call your x-script language
/*
Copy and paste the following directives to your header file as
it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library'
#import <ExTree.dll>
using namespace EXTREELib;
*/
EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown();
EXTREELib::IColumnPtr var_Column = ((EXTREELib::IColumnPtr)(spTree1->ExecuteTemplate(L"Columns.Add(`Column`)")));
var_Column->PutHeaderStrikeOut(VARIANT_TRUE);
var_Column->PutHeaderBold(VARIANT_TRUE);
127. How do I call your x-script language
/*
Copy and paste the following directives to your header file as
it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library'
#import <ExTree.dll>
using namespace EXTREELib;
*/
EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown();
spTree1->PutTemplate(L"Columns.Add(`Column`).HTMLCaption = `<b>C</b>olumn`");
126. How do I show alternate rows in different background color
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->PutBackColorAlternate(RGB(240,240,240)); spTree1->GetColumns()->Add(L"Column"); EXTREELib::IItemsPtr var_Items = spTree1->GetItems(); var_Items->AddItem("Item 1"); var_Items->AddItem("Item 2"); var_Items->AddItem("Item 3"); var_Items->AddItem("Item 4"); var_Items->AddItem("Item 5");
125. How do I enlarge the drop down filter window
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->PutFilterBarDropDownHeight("-320"); EXTREELib::IColumnPtr var_Column = ((EXTREELib::IColumnPtr)(spTree1->GetColumns()->Add(L"Column"))); var_Column->PutDisplayFilterButton(VARIANT_TRUE); var_Column->PutFilterBarDropDownWidth("-320"); spTree1->GetItems()->AddItem("Item 1"); spTree1->GetItems()->AddItem("Item 2");
124. How do I filter programatically the control
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); EXTREELib::IColumnPtr var_Column = ((EXTREELib::IColumnPtr)(spTree1->GetColumns()->Add(L"Column"))); var_Column->PutDisplayFilterButton(VARIANT_TRUE); var_Column->PutFilterType(EXTREELib::exPattern); var_Column->PutFilter(L"Item*"); spTree1->GetItems()->AddItem("Item 1"); spTree1->GetItems()->AddItem(""); spTree1->GetItems()->AddItem("Item 2"); spTree1->ApplyFilter();
123. How do I change the font of the control's filterbar
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->GetFilterBarFont()->PutSize(_variant_t(long(20))); EXTREELib::IColumnPtr var_Column = ((EXTREELib::IColumnPtr)(spTree1->GetColumns()->Add(L"Column"))); var_Column->PutDisplayFilterButton(VARIANT_TRUE); var_Column->PutFilterType(EXTREELib::exBlanks); spTree1->ApplyFilter();
122. Can I apply an EBN skin to the control's filter bar so I can change its visual appearance
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->GetVisualAppearance()->Add(1,"c:\\exontrol\\images\\normal.ebn"); spTree1->PutFilterBarBackColor(0x1000000); EXTREELib::IColumnPtr var_Column = ((EXTREELib::IColumnPtr)(spTree1->GetColumns()->Add(L"Column"))); var_Column->PutDisplayFilterButton(VARIANT_TRUE); var_Column->PutFilterType(EXTREELib::exBlanks); spTree1->ApplyFilter();
121. How do I change the background color of the control's filterbar
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->PutFilterBarBackColor(RGB(240,240,240)); EXTREELib::IColumnPtr var_Column = ((EXTREELib::IColumnPtr)(spTree1->GetColumns()->Add(L"Column"))); var_Column->PutDisplayFilterButton(VARIANT_TRUE); var_Column->PutFilterType(EXTREELib::exBlanks); spTree1->ApplyFilter();
120. How do I change the foreground color of the control's filterbar
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->PutFilterBarForeColor(RGB(255,0,0)); EXTREELib::IColumnPtr var_Column = ((EXTREELib::IColumnPtr)(spTree1->GetColumns()->Add(L"Column"))); var_Column->PutDisplayFilterButton(VARIANT_TRUE); var_Column->PutFilterType(EXTREELib::exBlanks); spTree1->ApplyFilter();
119. How do I change the height of the control's filterbar
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->PutFilterBarHeight(32); EXTREELib::IColumnPtr var_Column = ((EXTREELib::IColumnPtr)(spTree1->GetColumns()->Add(L"Column"))); var_Column->PutDisplayFilterButton(VARIANT_TRUE); var_Column->PutFilterType(EXTREELib::exBlanks); spTree1->ApplyFilter();
118. How do select only a portion of text when the control starts editing a cell
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->PutAllowEdit(VARIANT_TRUE); spTree1->PutSelStart(1); spTree1->PutSelLength(1); spTree1->GetColumns()->Add(L"Column"); spTree1->GetItems()->AddItem("Item 1"); spTree1->GetItems()->AddItem("Item 2");
117. How do I change the header's foreground color
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->PutForeColorHeader(RGB(255,0,0)); spTree1->GetColumns()->Add(L"Column 1"); spTree1->GetColumns()->Add(L"Column 2"); spTree1->GetItems()->AddItem("Item 1");
116. I have a picture on the control's background, the question is how do I draw selection as semi-transparent
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->PutPicture(IPictureDispPtr(((IDispatch*)(spTree1->ExecuteTemplate("loadpicture(`c:\\exontrol\\images\\zipdisk.gif`)"))))); spTree1->PutSelBackMode(EXTREELib::exTransparent); spTree1->GetColumns()->Add(L"Column"); spTree1->GetItems()->AddItem("Item 1"); spTree1->GetItems()->AddItem("Item 2");
115. It seems that the control uses the TAB key, is there any way to avoid that
/*
Copy and paste the following directives to your header file as
it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library'
#import <ExTree.dll>
using namespace EXTREELib;
*/
EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown();
spTree1->PutUseTabKey(VARIANT_FALSE);
114. I have FullRowSelect property on False, how do I force the user to select cells only in a specified column
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->PutSelectColumnIndex(1); spTree1->PutFullRowSelect(VARIANT_FALSE); spTree1->PutSelectColumn(VARIANT_TRUE); spTree1->GetColumns()->Add(L"Column 1"); spTree1->GetColumns()->Add(L"Column 2"); EXTREELib::IItemsPtr var_Items = spTree1->GetItems(); var_Items->PutCellCaption(var_Items->AddItem("Item 1"),long(1),"SubItem 1");
113. How do I assign a database to your control, using ADO, ADOR or ADODB objects
/*
Copy and paste the following directives to your header file as
it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library'
#import <ExTree.dll>
using namespace EXTREELib;
*/
EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown();
spTree1->PutColumnAutoResize(VARIANT_FALSE);
spTree1->PutContinueColumnScroll(VARIANT_FALSE);
/*
Includes the definition for CreateObject function like follows:
#include <comdef.h>
IUnknownPtr CreateObject( BSTR Object )
{
IUnknownPtr spResult;
spResult.CreateInstance( Object );
return spResult;
};
*/
/*
Copy and paste the following directives to your header file as
it defines the namespace 'ADODB' for the library: 'Microsoft ActiveX Data Objects 6.0 Library'
#import <msado15.dll> rename("EOF","REOF")
*/
ADODB::_RecordsetPtr rs = ::CreateObject(L"ADOR.Recordset");
rs->Open("Orders",_bstr_t("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\\Program Files\\Exontrol\\ExTree\\Sample\\VB\\S") +
"AMPLE.MDB",ADODB::adOpenStatic,ADODB::adLockOptimistic,0);
spTree1->PutDataSource(((ADODB::_RecordsetPtr)(rs)));
112. How do I change the visual appearance effect for the selected item, using EBN
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->GetVisualAppearance()->Add(1,"c:\\exontrol\\images\\normal.ebn"); spTree1->PutSelBackColor(0x1000000); spTree1->PutSelForeColor(RGB(0,0,0)); spTree1->PutShowFocusRect(VARIANT_FALSE); spTree1->GetColumns()->Add(L"Column"); spTree1->GetItems()->AddItem(long(0)); spTree1->GetItems()->AddItem(long(1));
111. How do I change the colors for the selected item
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->PutSelBackColor(RGB(0,0,0)); spTree1->GetColumns()->Add(L"Column"); spTree1->GetItems()->AddItem(long(0)); spTree1->GetItems()->AddItem(long(1));
110. How do I get ride of the rectangle arround focused item
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->PutShowFocusRect(VARIANT_FALSE); spTree1->GetColumns()->Add(L"Column"); spTree1->GetItems()->AddItem(long(0)); spTree1->GetItems()->AddItem(long(1));
109. How can I change the control's font
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->GetFont()->PutName(L"Tahoma"); spTree1->GetColumns()->Add(L"Column");
108. I can't scroll to the end of the data. What can I do
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->PutScrollBySingleLine(VARIANT_TRUE); spTree1->PutDrawGridLines(EXTREELib::exRowLines); spTree1->GetColumns()->Add(L"Column"); EXTREELib::IItemsPtr var_Items = spTree1->GetItems(); var_Items->PutItemHeight(var_Items->AddItem(long(0)),13); spTree1->PutItems(spTree1->GetItems(long(0)),vtMissing); EXTREELib::IItemsPtr var_Items1 = spTree1->GetItems(); var_Items1->PutItemHeight(var_Items1->AddItem(long(1)),26); spTree1->PutItems(spTree1->GetItems(long(0)),vtMissing); EXTREELib::IItemsPtr var_Items2 = spTree1->GetItems(); var_Items2->PutItemHeight(var_Items2->AddItem(long(2)),36); spTree1->PutItems(spTree1->GetItems(long(0)),vtMissing); EXTREELib::IItemsPtr var_Items3 = spTree1->GetItems(); var_Items3->PutItemHeight(var_Items3->AddItem(long(3)),48); spTree1->PutItems(spTree1->GetItems(long(0)),vtMissing);
107. How do I specify the column where the tree lines / hierarchy are shown
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->PutLinesAtRoot(EXTREELib::exGroupLinesAtRoot); spTree1->PutTreeColumnIndex(1); spTree1->GetColumns()->Add(L"Column 1"); spTree1->GetColumns()->Add(L"Column 2"); EXTREELib::IItemsPtr var_Items = spTree1->GetItems(); long h = var_Items->AddItem("Root 1.1"); var_Items->PutCellCaption(h,long(1),"Root 1.2"); var_Items->PutCellCaption(var_Items->InsertItem(h,long(0),"Child 1.1"),long(1),"Child 1.2"); var_Items->PutCellCaption(var_Items->InsertItem(h,long(0),"Child 2.1"),long(1),"Child 2.2"); var_Items->PutExpandItem(h,VARIANT_TRUE); h = var_Items->AddItem("Root 2.1"); var_Items->PutCellCaption(h,long(1),"Root 2.2"); var_Items->PutCellCaption(var_Items->InsertItem(h,long(0),"Child 1.1"),long(1),"Child 1.2");
106. How do I specify the indentation of the child items relative to their parents
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->PutLinesAtRoot(EXTREELib::exGroupLinesAtRoot); spTree1->PutIndent(11); spTree1->GetColumns()->Add(L"Column"); EXTREELib::IItemsPtr var_Items = spTree1->GetItems(); long h = var_Items->AddItem("Root 1"); var_Items->InsertItem(h,long(0),"Child 1"); var_Items->InsertItem(h,long(0),"Child 2"); var_Items->PutExpandItem(h,VARIANT_TRUE); h = var_Items->AddItem("Root 2"); var_Items->InsertItem(h,long(0),"Child");
105. Is there any option to select an item using the right button of the mouse (rclick)
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->PutRClickSelect(VARIANT_TRUE); spTree1->GetColumns()->Add(L"Column"); spTree1->GetItems()->AddItem("Item 1"); spTree1->GetItems()->AddItem("Item 2");
104. How do I edit a cell
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->PutAllowEdit(VARIANT_TRUE); spTree1->GetColumns()->Add(L"Column"); spTree1->GetItems()->AddItem("Item 1"); spTree1->GetItems()->AddItem("Item 2");
103. I have FullRowSelect property on False, how do I select a column
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->PutSelectColumnIndex(1); spTree1->PutFullRowSelect(VARIANT_FALSE);
102. How can I scroll columns one by one, not pixel by pixel
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->PutContinueColumnScroll(VARIANT_FALSE); spTree1->PutColumnAutoResize(VARIANT_FALSE); ((EXTREELib::IColumnPtr)(spTree1->GetColumns()->Add(L"1")))->PutWidth(128); ((EXTREELib::IColumnPtr)(spTree1->GetColumns()->Add(L"2")))->PutWidth(128); ((EXTREELib::IColumnPtr)(spTree1->GetColumns()->Add(L"3")))->PutWidth(128); ((EXTREELib::IColumnPtr)(spTree1->GetColumns()->Add(L"4")))->PutWidth(128); ((EXTREELib::IColumnPtr)(spTree1->GetColumns()->Add(L"5")))->PutWidth(128);
101. How can I enable multiple items selection
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->PutSingleSel(VARIANT_FALSE); spTree1->GetColumns()->Add(L"Column"); spTree1->GetItems()->AddItem(long(0)); spTree1->GetItems()->AddItem(long(1)); spTree1->GetItems()->AddItem(long(2));
100. How can I programmatically change the column where incremental searching is performed
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->GetColumns()->Add(L"Column 1"); spTree1->GetColumns()->Add(L"Column 2"); EXTREELib::IItemsPtr var_Items = spTree1->GetItems(); var_Items->PutCellCaption(var_Items->AddItem("Item 1"),long(1),"SubItem 1"); spTree1->PutSearchColumnIndex(1);
99. How do I disable the full-row selection in the control
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->PutFullRowSelect(VARIANT_FALSE); spTree1->GetColumns()->Add(L"Column"); spTree1->GetItems()->AddItem("One"); spTree1->GetItems()->AddItem("Two");
98. Is there any option to specify the height of the items, before adding them
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->PutDefaultItemHeight(32); spTree1->GetColumns()->Add(L"Column"); spTree1->GetItems()->AddItem("One"); spTree1->GetItems()->AddItem("Two");
97. How do lock / fix some columns to the control, so I can see them all the time, event if I scroll the columns
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->PutCountLockedColumns(1); spTree1->PutBackColorLock(RGB(240,240,240)); spTree1->PutColumnAutoResize(VARIANT_FALSE); ((EXTREELib::IColumnPtr)(spTree1->GetColumns()->Add(L"Locked")))->PutWidth(128); ((EXTREELib::IColumnPtr)(spTree1->GetColumns()->Add(L"Un-Locked 1")))->PutWidth(128); ((EXTREELib::IColumnPtr)(spTree1->GetColumns()->Add(L"Un-Locked 2")))->PutWidth(128); ((EXTREELib::IColumnPtr)(spTree1->GetColumns()->Add(L"Un-Locked 3")))->PutWidth(128); EXTREELib::IItemsPtr var_Items = spTree1->GetItems(); var_Items->PutCellCaption(var_Items->AddItem("locked"),long(1),"unlocked");
96. How do I change the control's background / foreground color on the locked area
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->PutCountLockedColumns(1); spTree1->PutForeColorLock(RGB(240,240,240)); spTree1->PutBackColorLock(RGB(128,128,128)); spTree1->PutColumnAutoResize(VARIANT_FALSE); ((EXTREELib::IColumnPtr)(spTree1->GetColumns()->Add(L"Locked")))->PutWidth(128); ((EXTREELib::IColumnPtr)(spTree1->GetColumns()->Add(L"Un-Locked 1")))->PutWidth(128); ((EXTREELib::IColumnPtr)(spTree1->GetColumns()->Add(L"Un-Locked 2")))->PutWidth(128); ((EXTREELib::IColumnPtr)(spTree1->GetColumns()->Add(L"Un-Locked 3")))->PutWidth(128); EXTREELib::IItemsPtr var_Items = spTree1->GetItems(); var_Items->PutCellCaption(var_Items->AddItem("locked"),long(1),"unlocked");
95. How do I change the control's foreground color
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->PutForeColor(RGB(120,120,120)); spTree1->GetColumns()->Add(L"Column"); spTree1->GetItems()->AddItem("item");
94. How do I change the control's background color
/*
Copy and paste the following directives to your header file as
it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library'
#import <ExTree.dll>
using namespace EXTREELib;
*/
EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown();
spTree1->PutBackColor(RGB(200,200,200));
93. How do I use my own icons for my radio buttons
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->Images(_bstr_t("gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0") + "/oFBoVDolFo1HpFJpVLplNp1PqFRqVTqlVq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1" + "/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m0ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qO" + "x3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/y" + "NAOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA="); spTree1->PutRadioImage(VARIANT_FALSE,1); spTree1->PutRadioImage(VARIANT_TRUE,2); ((EXTREELib::IColumnPtr)(spTree1->GetColumns()->Add(L"Radio")))->PutDef(EXTREELib::exCellHasRadioButton,VARIANT_TRUE); EXTREELib::IItemsPtr var_Items = spTree1->GetItems(); var_Items->AddItem("Radio 1"); var_Items->PutCellState(var_Items->AddItem("Radio 2"),long(0),1); var_Items->AddItem("Radio 3");
92. How do I use my own icons for checkbox cells
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->Images(_bstr_t("gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0") + "/oFBoVDolFo1HpFJpVLplNp1PqFRqVTqlVq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1" + "/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m0ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qO" + "x3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/y" + "NAOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA="); spTree1->PutCheckImage(EXTREELib::Unchecked,1); spTree1->PutCheckImage(EXTREELib::Checked,2); ((EXTREELib::IColumnPtr)(spTree1->GetColumns()->Add(L"Check")))->PutDef(EXTREELib::exCellHasCheckBox,VARIANT_TRUE); EXTREELib::IItemsPtr var_Items = spTree1->GetItems(); var_Items->AddItem("Check 1"); var_Items->PutCellState(var_Items->AddItem("Check 2"),long(0),1);
91. How do I perform my own sorting when user clicks the column's header
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->PutSortOnClick(EXTREELib::exUserSort); spTree1->GetColumns()->Add(L"Column"); spTree1->GetItems()->AddItem("Item 1"); spTree1->GetItems()->AddItem("Item 2");
90. How do I disable sorting a specified column when clicking its header
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->GetColumns()->Add(L"1"); ((EXTREELib::IColumnPtr)(spTree1->GetColumns()->Add(L"NoSort")))->PutAllowSort(VARIANT_FALSE);
89. How do I disable sorting the columns when clicking the control's header
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->PutSortOnClick(EXTREELib::exNoSort); spTree1->GetColumns()->Add(L"1"); spTree1->GetColumns()->Add(L"2");
88. How do I put a picture on the center of the control
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->PutPicture(IPictureDispPtr(((IDispatch*)(spTree1->ExecuteTemplate("loadpicture(`c:\\exontrol\\images\\zipdisk.gif`)"))))); spTree1->PutPictureDisplay(EXTREELib::MiddleCenter);
87. How do I resize/stretch a picture on the control's background
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->PutPicture(IPictureDispPtr(((IDispatch*)(spTree1->ExecuteTemplate("loadpicture(`c:\\exontrol\\images\\zipdisk.gif`)"))))); spTree1->PutPictureDisplay(EXTREELib::Stretch);
86. How do I put a picture on the control's center right bottom side
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->PutPicture(IPictureDispPtr(((IDispatch*)(spTree1->ExecuteTemplate("loadpicture(`c:\\exontrol\\images\\zipdisk.gif`)"))))); spTree1->PutPictureDisplay(EXTREELib::LowerRight);
85. How do I put a picture on the control's center left bottom side
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->PutPicture(IPictureDispPtr(((IDispatch*)(spTree1->ExecuteTemplate("loadpicture(`c:\\exontrol\\images\\zipdisk.gif`)"))))); spTree1->PutPictureDisplay(EXTREELib::LowerLeft);
84. How do I put a picture on the control's center top side
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->PutPicture(IPictureDispPtr(((IDispatch*)(spTree1->ExecuteTemplate("loadpicture(`c:\\exontrol\\images\\zipdisk.gif`)"))))); spTree1->PutPictureDisplay(EXTREELib::UpperCenter);
83. How do I put a picture on the control's right top corner
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->PutPicture(IPictureDispPtr(((IDispatch*)(spTree1->ExecuteTemplate("loadpicture(`c:\\exontrol\\images\\zipdisk.gif`)"))))); spTree1->PutPictureDisplay(EXTREELib::UpperRight);
82. How do I put a picture on the control's left top corner
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->PutPicture(IPictureDispPtr(((IDispatch*)(spTree1->ExecuteTemplate("loadpicture(`c:\\exontrol\\images\\zipdisk.gif`)"))))); spTree1->PutPictureDisplay(EXTREELib::UpperLeft);
81. How do I put a picture on the control's background
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->PutPicture(IPictureDispPtr(((IDispatch*)(spTree1->ExecuteTemplate("loadpicture(`c:\\exontrol\\images\\zipdisk.gif`)")))));
80. How do I sort descending a column, and put the sorting icon in the column's header
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->GetColumns()->Add(L"Column"); EXTREELib::IItemsPtr var_Items = spTree1->GetItems(); var_Items->AddItem("Item 1"); var_Items->AddItem("Item 2"); var_Items->AddItem("Item 3"); spTree1->GetColumns()->GetItem(long(0))->PutSortOrder(EXTREELib::SortDescending);
79. How do I sort ascending a column, and put the sorting icon in the column's header
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->GetColumns()->Add(L"Column"); EXTREELib::IItemsPtr var_Items = spTree1->GetItems(); var_Items->AddItem("Item 3"); var_Items->AddItem("Item 1"); var_Items->AddItem("Item 2"); spTree1->GetColumns()->GetItem(long(0))->PutSortOrder(EXTREELib::SortAscending);
78. How do I perform my own/custom sort, using my extra strings
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); ((EXTREELib::IColumnPtr)(spTree1->GetColumns()->Add(L"desc")))->PutSortType(EXTREELib::SortUserData); EXTREELib::IItemsPtr var_Items = spTree1->GetItems(); var_Items->PutCellData(var_Items->AddItem("A"),long(0),"C"); var_Items->PutCellData(var_Items->AddItem("B"),long(0),"B"); var_Items->PutCellData(var_Items->AddItem("C"),long(0),"A"); var_Items->SortChildren(0,long(0),VARIANT_FALSE);
77. How do I perform my own/custom sort, using my extra numbers
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); ((EXTREELib::IColumnPtr)(spTree1->GetColumns()->Add(L"desc")))->PutSortType(EXTREELib::SortUserData); EXTREELib::IItemsPtr var_Items = spTree1->GetItems(); var_Items->PutCellData(var_Items->AddItem(long(0)),long(0),long(2)); var_Items->PutCellData(var_Items->AddItem(long(1)),long(0),long(1)); var_Items->PutCellData(var_Items->AddItem(long(2)),long(0),long(0)); var_Items->SortChildren(0,long(0),VARIANT_FALSE);
76. By default, the column gets sorted as strings, so how do I sort a column by time only
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); ((EXTREELib::IColumnPtr)(spTree1->GetColumns()->Add(L"desc")))->PutSortType(EXTREELib::SortTime); EXTREELib::IItemsPtr var_Items = spTree1->GetItems(); var_Items->AddItem("11:00"); var_Items->AddItem("10:10"); var_Items->AddItem("12:12"); var_Items->SortChildren(0,long(0),VARIANT_FALSE);
75. By default, the column gets sorted as strings, so how do I sort a column by date and time
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); ((EXTREELib::IColumnPtr)(spTree1->GetColumns()->Add(L"desc")))->PutSortType(EXTREELib::SortDateTime); EXTREELib::IItemsPtr var_Items = spTree1->GetItems(); var_Items->AddItem("1/1/2001 11:00"); var_Items->AddItem("1/1/2001 10:10"); var_Items->AddItem("1/3/2003"); var_Items->SortChildren(0,long(0),VARIANT_FALSE);
74. By default, the column gets sorted as strings, so how do I sort a column by dates
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); ((EXTREELib::IColumnPtr)(spTree1->GetColumns()->Add(L"desc")))->PutSortType(EXTREELib::SortDate); EXTREELib::IItemsPtr var_Items = spTree1->GetItems(); var_Items->AddItem("1/1/2001"); var_Items->AddItem("1/2/2002"); var_Items->AddItem("1/3/2003"); var_Items->SortChildren(0,long(0),VARIANT_FALSE);
73. How do I sort a column by numbers
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); ((EXTREELib::IColumnPtr)(spTree1->GetColumns()->Add(L"desc")))->PutSortType(EXTREELib::SortNumeric); EXTREELib::IItemsPtr var_Items = spTree1->GetItems(); var_Items->AddItem(long(1)); var_Items->AddItem(long(5)); var_Items->AddItem(long(10)); var_Items->SortChildren(0,long(0),VARIANT_FALSE);
72. How do I hide the control's header bar
/*
Copy and paste the following directives to your header file as
it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library'
#import <ExTree.dll>
using namespace EXTREELib;
*/
EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown();
spTree1->PutHeaderVisible(VARIANT_FALSE);
71. How do change the visual appearance for the control's header bar, using EBN
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->GetVisualAppearance()->Add(1,"c:\\exontrol\\images\\normal.ebn"); spTree1->PutBackColorHeader(0x1000000);
70. How do I remove the control's border
/*
Copy and paste the following directives to your header file as
it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library'
#import <ExTree.dll>
using namespace EXTREELib;
*/
EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown();
spTree1->PutAppearance(EXTREELib::None2);
69. I have a hierarchy and I need to filter only root items that match, with thier childs
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->PutLinesAtRoot(EXTREELib::exLinesAtRoot); spTree1->PutFilterInclude(EXTREELib::exRootsWithChilds); EXTREELib::IColumnPtr var_Column = ((EXTREELib::IColumnPtr)(spTree1->GetColumns()->Add(L"Column"))); var_Column->PutDisplayFilterButton(VARIANT_TRUE); var_Column->PutFilterType(EXTREELib::exFilter); var_Column->PutFilter(L"R1"); EXTREELib::IItemsPtr var_Items = spTree1->GetItems(); long h = var_Items->AddItem("R1"); var_Items->InsertItem(h,long(0),"C1"); var_Items->InsertItem(h,long(0),"C2"); var_Items->PutExpandItem(h,VARIANT_TRUE); h = var_Items->AddItem("R2"); var_Items->InsertItem(h,long(0),"C1"); var_Items->InsertItem(h,long(0),"C2"); spTree1->ApplyFilter();
68. I have a hierarchy and I need to filter only root items that match, without thier childs
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->PutLinesAtRoot(EXTREELib::exLinesAtRoot); spTree1->PutFilterInclude(EXTREELib::exRootsWithoutChilds); EXTREELib::IColumnPtr var_Column = ((EXTREELib::IColumnPtr)(spTree1->GetColumns()->Add(L"Column"))); var_Column->PutDisplayFilterButton(VARIANT_TRUE); var_Column->PutFilterType(EXTREELib::exFilter); var_Column->PutFilter(L"R1"); EXTREELib::IItemsPtr var_Items = spTree1->GetItems(); long h = var_Items->AddItem("R1"); var_Items->InsertItem(h,long(0),"C1"); var_Items->InsertItem(h,long(0),"C2"); var_Items->PutExpandItem(h,VARIANT_TRUE); h = var_Items->AddItem("R2"); var_Items->InsertItem(h,long(0),"C1"); var_Items->InsertItem(h,long(0),"C2"); spTree1->ApplyFilter();
67. I have a hierarchy and I need to filter only parent items that match, including thier childs
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->PutLinesAtRoot(EXTREELib::exLinesAtRoot); spTree1->PutFilterInclude(EXTREELib::exItemsWithChilds); EXTREELib::IColumnPtr var_Column = ((EXTREELib::IColumnPtr)(spTree1->GetColumns()->Add(L"Column"))); var_Column->PutDisplayFilterButton(VARIANT_TRUE); var_Column->PutFilterType(EXTREELib::exFilter); var_Column->PutFilter(L"R1"); EXTREELib::IItemsPtr var_Items = spTree1->GetItems(); long h = var_Items->AddItem("R1"); var_Items->InsertItem(h,long(0),"C1"); var_Items->InsertItem(h,long(0),"C2"); var_Items->PutExpandItem(h,VARIANT_TRUE); h = var_Items->AddItem("R2"); var_Items->InsertItem(h,long(0),"C1"); var_Items->InsertItem(h,long(0),"C2"); spTree1->ApplyFilter();
66. How can I get ride/hide of the "Filter For" field
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); EXTREELib::IColumnPtr var_Column = ((EXTREELib::IColumnPtr)(spTree1->GetColumns()->Add(L"Column"))); var_Column->PutDisplayFilterButton(VARIANT_TRUE); var_Column->PutDisplayFilterPattern(VARIANT_FALSE);
65. Is there any way to get listed only visible items in the drop down filter window
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->PutLinesAtRoot(EXTREELib::exLinesAtRoot); spTree1->PutDescription(EXTREELib::exFilterBarAll,L""); spTree1->PutDescription(EXTREELib::exFilterBarBlanks,L""); spTree1->PutDescription(EXTREELib::exFilterBarNonBlanks,L""); EXTREELib::IColumnPtr var_Column = ((EXTREELib::IColumnPtr)(spTree1->GetColumns()->Add(L"P1"))); var_Column->PutDisplayFilterButton(VARIANT_TRUE); var_Column->PutDisplayFilterPattern(VARIANT_FALSE); var_Column->PutFilterList(EXTREELib::exVisibleItems); EXTREELib::IColumnPtr var_Column1 = ((EXTREELib::IColumnPtr)(spTree1->GetColumns()->Add(L"P2"))); var_Column1->PutDisplayFilterButton(VARIANT_TRUE); var_Column1->PutDisplayFilterPattern(VARIANT_FALSE); EXTREELib::IItemsPtr var_Items = spTree1->GetItems(); long h = var_Items->AddItem("R1"); var_Items->PutCellCaption(h,long(1),"R2"); var_Items->PutCellCaption(var_Items->InsertItem(h,long(0),"Cell 1.1"),long(1),"Cell 1.2"); var_Items->PutCellCaption(var_Items->InsertItem(h,long(0),"Cell 2.1"),long(1),"Cell 2.2");
64. How do I filter for items that match exactly the specified string
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); EXTREELib::IColumnPtr var_Column = ((EXTREELib::IColumnPtr)(spTree1->GetColumns()->Add(L"Column"))); var_Column->PutDisplayFilterButton(VARIANT_TRUE); var_Column->PutFilterType(EXTREELib::exFilter); var_Column->PutFilter(L"Item 1"); spTree1->GetItems()->AddItem("Item 1"); spTree1->GetItems()->AddItem("Item 2"); spTree1->GetItems()->AddItem("Item 3"); spTree1->ApplyFilter();
63. How can I can I programmatically filter for items with a specified icon assigned
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->Images(_bstr_t("gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0") + "/oFBoVDolFo1HpFJpVLplNp1PqFRqVTqlVq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1" + "/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m0ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qO" + "x3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/y" + "NAOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA="); EXTREELib::IColumnPtr var_Column = ((EXTREELib::IColumnPtr)(spTree1->GetColumns()->Add(L"Column"))); var_Column->PutDisplayFilterButton(VARIANT_TRUE); var_Column->PutFilterType(EXTREELib::exImage); var_Column->PutFilter(L"1"); EXTREELib::IItemsPtr var_Items = spTree1->GetItems(); var_Items->PutCellImage(var_Items->AddItem("Image 1"),long(0),1); var_Items->PutCellImage(var_Items->AddItem("Image 1"),long(0),1); var_Items->PutCellImage(var_Items->AddItem("Image 2"),long(0),2); var_Items->PutCellImage(var_Items->AddItem("Image 3"),long(0),3); spTree1->ApplyFilter();
62. How can I can I programmatically filter the checked items
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); EXTREELib::IColumnPtr var_Column = ((EXTREELib::IColumnPtr)(spTree1->GetColumns()->Add(L"Column"))); var_Column->PutDef(EXTREELib::exCellHasCheckBox,VARIANT_TRUE); var_Column->PutDisplayFilterButton(VARIANT_TRUE); var_Column->PutFilterType(EXTREELib::exCheck); var_Column->PutFilter(L"0"); spTree1->GetItems()->AddItem(long(0)); EXTREELib::IItemsPtr var_Items = spTree1->GetItems(); var_Items->PutCellState(var_Items->AddItem(long(1)),long(0),1); spTree1->GetItems()->AddItem(long(2)); spTree1->ApplyFilter();
61. How can I can I filter programmatically the items based on some numerichal rules
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); EXTREELib::IColumnPtr var_Column = ((EXTREELib::IColumnPtr)(spTree1->GetColumns()->Add(L"Column"))); var_Column->PutDisplayFilterButton(VARIANT_TRUE); var_Column->PutFilterType(EXTREELib::exNumeric); var_Column->PutFilter(L"> 0 <= 1"); spTree1->GetItems()->AddItem(long(0)); spTree1->GetItems()->AddItem(long(1)); spTree1->GetItems()->AddItem(long(2)); spTree1->ApplyFilter();
60. How can I can I filter programmatically the items based on a range/interval of dates
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); EXTREELib::IColumnPtr var_Column = ((EXTREELib::IColumnPtr)(spTree1->GetColumns()->Add(L"Column"))); var_Column->PutDisplayFilterButton(VARIANT_TRUE); var_Column->PutDisplayFilterDate(VARIANT_TRUE); var_Column->PutFilterType(EXTREELib::exDate); var_Column->PutFilter(L"1/1/2001 to 1/1/2002"); spTree1->GetItems()->AddItem("1/1/2001"); spTree1->GetItems()->AddItem("2/1/2002"); spTree1->ApplyFilter();
59. How can I can I filter programmatically given a specified pattern using wild characters like * or
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); EXTREELib::IColumnPtr var_Column = ((EXTREELib::IColumnPtr)(spTree1->GetColumns()->Add(L"Column"))); var_Column->PutDisplayFilterButton(VARIANT_TRUE); var_Column->PutFilterType(EXTREELib::exPattern); var_Column->PutFilter(L"0*"); spTree1->GetItems()->AddItem(long(0)); spTree1->GetItems()->AddItem("00"); spTree1->GetItems()->AddItem(long(1)); spTree1->GetItems()->AddItem("11"); spTree1->ApplyFilter();
58. How can I can I select programmatically "Blanks/NonBlanks" option in the column's drop down filter
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); EXTREELib::IColumnPtr var_Column = ((EXTREELib::IColumnPtr)(spTree1->GetColumns()->Add(L"Column"))); var_Column->PutDisplayFilterButton(VARIANT_TRUE); var_Column->PutFilterType(EXTREELib::exBlanks); spTree1->ApplyFilter();
57. How can I display the column's filter
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); ((EXTREELib::IColumnPtr)(spTree1->GetColumns()->Add(L"")))->PutDisplayFilterButton(VARIANT_TRUE);
56. How can I show only the vertical scroll bar
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->PutColumnAutoResize(VARIANT_TRUE); spTree1->PutScrollBars(EXTREELib::exDisableNoVertical); spTree1->GetColumns()->Add(L"1"); spTree1->GetColumns()->Add(L"2");
55. How can I show the control's grid lines only for added/visible items
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->PutMarkSearchColumn(VARIANT_FALSE); spTree1->PutDrawGridLines(EXTREELib::exRowLines); spTree1->GetColumns()->Add(L"Column 1"); spTree1->GetColumns()->Add(L"Column 2"); spTree1->GetItems()->AddItem(long(0)); spTree1->GetItems()->AddItem(long(1)); spTree1->GetItems()->AddItem(long(2));
54. Can I hide the hierarchy lines
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->PutLinesAtRoot(EXTREELib::exGroupLinesAtRoot); spTree1->PutHasLines(EXTREELib::exNoLine); spTree1->GetColumns()->Add(L"Column"); EXTREELib::IItemsPtr var_Items = spTree1->GetItems(); long h = var_Items->AddItem("Root 1"); var_Items->InsertItem(h,long(0),"Child 1"); var_Items->InsertItem(h,long(0),"Child 2"); var_Items->PutExpandItem(h,VARIANT_TRUE); h = var_Items->AddItem("Root 2"); var_Items->InsertItem(h,long(0),"Child");
53. Can I change the style or type for the hierarchy lines
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->PutLinesAtRoot(EXTREELib::exGroupLinesAtRoot); spTree1->PutHasLines(EXTREELib::exThinLine); spTree1->GetColumns()->Add(L"Column"); EXTREELib::IItemsPtr var_Items = spTree1->GetItems(); long h = var_Items->AddItem("Root 1"); var_Items->InsertItem(h,long(0),"Child 1"); var_Items->InsertItem(h,long(0),"Child 2"); var_Items->PutExpandItem(h,VARIANT_TRUE); h = var_Items->AddItem("Root 2"); var_Items->InsertItem(h,long(0),"Child");
52. Can I use my own icons for the +/- ( expand/collapse ) buttons
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->Images(_bstr_t("gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0") + "/oFBoVDolFo1HpFJpVLplNp1PqFRqVTqlVq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1" + "/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m0ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qO" + "x3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/y" + "NAOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA="); spTree1->PutLinesAtRoot(EXTREELib::exGroupLinesAtRoot); spTree1->PutHasButtons(EXTREELib::exCustom); spTree1->PutHasButtonsCustom(VARIANT_FALSE,1); spTree1->PutHasButtonsCustom(VARIANT_TRUE,2); spTree1->GetColumns()->Add(L"Column"); EXTREELib::IItemsPtr var_Items = spTree1->GetItems(); long h = var_Items->AddItem("Root 1"); var_Items->InsertItem(h,long(0),"Child 1"); var_Items->InsertItem(h,long(0),"Child 2"); var_Items->PutExpandItem(h,VARIANT_TRUE); h = var_Items->AddItem("Root 2"); var_Items->InsertItem(h,long(0),"Child");
51. How do I change visual appearance of the +/- ( expand/collapse ) buttons
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->PutLinesAtRoot(EXTREELib::exGroupLinesAtRoot); spTree1->PutHasButtons(EXTREELib::exWPlus); spTree1->GetColumns()->Add(L"Column"); EXTREELib::IItemsPtr var_Items = spTree1->GetItems(); long h = var_Items->AddItem("Root 1"); var_Items->InsertItem(h,long(0),"Child 1"); var_Items->InsertItem(h,long(0),"Child 2"); var_Items->PutExpandItem(h,VARIANT_TRUE); h = var_Items->AddItem("Root 2"); var_Items->InsertItem(h,long(0),"Child");
50. How can I change the "IsChecked/IsUnchecked" caption in the control's filter bar, when I filter for checked items
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); EXTREELib::IColumnPtr var_Column = ((EXTREELib::IColumnPtr)(spTree1->GetColumns()->Add(L"Column"))); var_Column->PutDisplayFilterButton(VARIANT_TRUE); var_Column->PutFilterType(EXTREELib::exCheck); var_Column->PutFilter(L"0"); spTree1->PutDescription(EXTREELib::exFilterBarIsChecked,L"Check_On"); spTree1->PutDescription(EXTREELib::exFilterBarIsUnchecked,L"Check_Off"); spTree1->ApplyFilter();
49. How can I change the "Checked" caption in the drop down filter window, when I filter for checked items
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); EXTREELib::IColumnPtr var_Column = ((EXTREELib::IColumnPtr)(spTree1->GetColumns()->Add(L"Column"))); var_Column->PutDisplayFilterButton(VARIANT_TRUE); var_Column->PutFilterType(EXTREELib::exCheck); spTree1->PutDescription(EXTREELib::exFilterBarChecked,L"with check on"); spTree1->PutDescription(EXTREELib::exFilterBarUnchecked,L"with check off");
48. How can I change the name of the week days in the drop down calendar window, being displayed when I filter items between dates
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); EXTREELib::IColumnPtr var_Column = ((EXTREELib::IColumnPtr)(spTree1->GetColumns()->Add(L"Column"))); var_Column->PutDisplayFilterButton(VARIANT_TRUE); var_Column->PutDisplayFilterDate(VARIANT_TRUE); spTree1->PutDescription(EXTREELib::exFilterBarDateWeekDays,L"Du Lu Ma Mi Jo Vi Si"); spTree1->ApplyFilter();
47. How can I change the name of the months in the drop down calendar window, being displayed when I filter items between dates
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); EXTREELib::IColumnPtr var_Column = ((EXTREELib::IColumnPtr)(spTree1->GetColumns()->Add(L"Column"))); var_Column->PutDisplayFilterButton(VARIANT_TRUE); var_Column->PutDisplayFilterDate(VARIANT_TRUE); spTree1->PutDescription(EXTREELib::exFilterBarDateMonths,L"Janvier Février Mars Avril Mai Juin Juillet Août Septembre Octobre Novembre Décembre"); spTree1->ApplyFilter();
46. Can I change the "Today" caption being displayed in the drop down calendar, when I filter for dates
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); EXTREELib::IColumnPtr var_Column = ((EXTREELib::IColumnPtr)(spTree1->GetColumns()->Add(L"Column"))); var_Column->PutDisplayFilterButton(VARIANT_TRUE); var_Column->PutDisplayFilterDate(VARIANT_TRUE); spTree1->PutDescription(EXTREELib::exFilterBarDateTodayCaption,L"Azi"); spTree1->ApplyFilter();
45. The drop down filter window displays a "to" string between two datem when I filter dates. Can I change that
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); EXTREELib::IColumnPtr var_Column = ((EXTREELib::IColumnPtr)(spTree1->GetColumns()->Add(L"Column"))); var_Column->PutDisplayFilterButton(VARIANT_TRUE); var_Column->PutDisplayFilterDate(VARIANT_TRUE); spTree1->PutDescription(EXTREELib::exFilterBarDateTo,L"->"); spTree1->ApplyFilter();
44. How can I filter the items that are between an interval/range of dates
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); EXTREELib::IColumnPtr var_Column = ((EXTREELib::IColumnPtr)(spTree1->GetColumns()->Add(L"Column"))); var_Column->PutDisplayFilterButton(VARIANT_TRUE); var_Column->PutDisplayFilterDate(VARIANT_TRUE); spTree1->ApplyFilter();
43. Can I change the "Date:" caption when the column's drop down filter window is shown
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); EXTREELib::IColumnPtr var_Column = ((EXTREELib::IColumnPtr)(spTree1->GetColumns()->Add(L"Column"))); var_Column->PutDisplayFilterButton(VARIANT_TRUE); var_Column->PutDisplayFilterDate(VARIANT_TRUE); spTree1->PutDescription(EXTREELib::exFilterBarDate,L"Range"); spTree1->ApplyFilter();
42. Can I filter for values using OR - NOT , instead AND operator
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); EXTREELib::IColumnPtr var_Column = ((EXTREELib::IColumnPtr)(spTree1->GetColumns()->Add(L"Column 1"))); var_Column->PutDisplayFilterButton(VARIANT_TRUE); var_Column->PutFilterType(EXTREELib::exBlanks); EXTREELib::IColumnPtr var_Column1 = ((EXTREELib::IColumnPtr)(spTree1->GetColumns()->Add(L"Column 2"))); var_Column1->PutDisplayFilterButton(VARIANT_TRUE); var_Column1->PutFilterType(EXTREELib::exBlanks); EXTREELib::IColumnPtr var_Column2 = ((EXTREELib::IColumnPtr)(spTree1->GetColumns()->Add(L"Column 3"))); var_Column2->PutDisplayFilterButton(VARIANT_TRUE); var_Column2->PutFilterType(EXTREELib::exBlanks); spTree1->PutFilterCriteria(L"%0 or not %1 and %2"); spTree1->ApplyFilter();
41. Can I change the NOT string in the filter bar
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); EXTREELib::IColumnPtr var_Column = ((EXTREELib::IColumnPtr)(spTree1->GetColumns()->Add(L"Column 1"))); var_Column->PutDisplayFilterButton(VARIANT_TRUE); var_Column->PutFilterType(EXTREELib::exBlanks); EXTREELib::IColumnPtr var_Column1 = ((EXTREELib::IColumnPtr)(spTree1->GetColumns()->Add(L"Column 2"))); var_Column1->PutDisplayFilterButton(VARIANT_TRUE); var_Column1->PutFilterType(EXTREELib::exNonBlanks); spTree1->PutFilterCriteria(L"not %0 or %1"); spTree1->PutDescription(EXTREELib::exFilterBarNot,L" ! "); spTree1->PutDescription(EXTREELib::exFilterBarIsNonBlank,L" ! IsBlank"); spTree1->ApplyFilter();
40. Can I change the OR string in the filter bar
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); EXTREELib::IColumnPtr var_Column = ((EXTREELib::IColumnPtr)(spTree1->GetColumns()->Add(L"Column 1"))); var_Column->PutDisplayFilterButton(VARIANT_TRUE); var_Column->PutFilterType(EXTREELib::exBlanks); EXTREELib::IColumnPtr var_Column1 = ((EXTREELib::IColumnPtr)(spTree1->GetColumns()->Add(L"Column 2"))); var_Column1->PutDisplayFilterButton(VARIANT_TRUE); var_Column1->PutFilterType(EXTREELib::exNonBlanks); spTree1->PutFilterCriteria(L"%0 or %1"); spTree1->PutDescription(EXTREELib::exFilterBarOr,L" | "); spTree1->ApplyFilter();
39. Can I change the AND string in the filter bar
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); EXTREELib::IColumnPtr var_Column = ((EXTREELib::IColumnPtr)(spTree1->GetColumns()->Add(L"Column 1"))); var_Column->PutDisplayFilterButton(VARIANT_TRUE); var_Column->PutFilterType(EXTREELib::exBlanks); EXTREELib::IColumnPtr var_Column1 = ((EXTREELib::IColumnPtr)(spTree1->GetColumns()->Add(L"Column 2"))); var_Column1->PutDisplayFilterButton(VARIANT_TRUE); var_Column1->PutFilterType(EXTREELib::exNonBlanks); spTree1->PutDescription(EXTREELib::exFilterBarAnd,L" & "); spTree1->ApplyFilter();
38. The "IsBlank" caption shown in the control's filterbar when I select "Blanks" or "NonBlanks" items in the column's drop down filter window
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); EXTREELib::IColumnPtr var_Column = ((EXTREELib::IColumnPtr)(spTree1->GetColumns()->Add(L"Column"))); var_Column->PutDisplayFilterButton(VARIANT_TRUE); var_Column->PutFilterType(EXTREELib::exBlanks); spTree1->PutDescription(EXTREELib::exFilterBarIsBlank,L"Is Empty"); spTree1->PutDescription(EXTREELib::exFilterBarIsNonBlank,L"Is Not Empty"); spTree1->ApplyFilter();
37. Is there any option to remove the tooltip when the cursor hovers the column's drop down filter window
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); ((EXTREELib::IColumnPtr)(spTree1->GetColumns()->Add(L"Column")))->PutDisplayFilterButton(VARIANT_TRUE); spTree1->PutDescription(EXTREELib::exFilterBarFilterTitle,L""); spTree1->PutDescription(EXTREELib::exFilterBarPatternFilterTitle,L""); spTree1->PutDescription(EXTREELib::exFilterBarTooltip,L""); spTree1->PutDescription(EXTREELib::exFilterBarPatternTooltip,L""); spTree1->PutDescription(EXTREELib::exFilterBarFilterForTooltip,L""); spTree1->PutDescription(EXTREELib::exFilterBarDateTooltip,L""); spTree1->PutDescription(EXTREELib::exFilterBarDateTitle,L"");
36. How can I change the "Filter For" caption in the column's drop down filter window
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); ((EXTREELib::IColumnPtr)(spTree1->GetColumns()->Add(L"Column")))->PutDisplayFilterButton(VARIANT_TRUE); spTree1->PutDescription(EXTREELib::exFilterBarFilterForCaption,L"new caption");
35. Can I remove the "All", "Blanks" and "NonBlanks" items in the drop down filter window
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); ((EXTREELib::IColumnPtr)(spTree1->GetColumns()->Add(L"Column")))->PutDisplayFilterButton(VARIANT_TRUE); spTree1->PutDescription(EXTREELib::exFilterBarAll,L""); spTree1->PutDescription(EXTREELib::exFilterBarBlanks,L""); spTree1->PutDescription(EXTREELib::exFilterBarNonBlanks,L"");
34. How do I change the "All", "Blanks" or/and "NonBlanks" caption in the drop down filter window
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); ((EXTREELib::IColumnPtr)(spTree1->GetColumns()->Add(L"Column")))->PutDisplayFilterButton(VARIANT_TRUE); spTree1->PutDescription(EXTREELib::exFilterBarAll,L"new name for (All)");
33. How can I change the position of the column
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->GetColumns()->Add(L"Column 1"); ((EXTREELib::IColumnPtr)(spTree1->GetColumns()->Add(L"Column 2")))->PutPosition(0);
32. Can I make strikeout the column's header
/*
Copy and paste the following directives to your header file as
it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library'
#import <ExTree.dll>
using namespace EXTREELib;
*/
EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown();
((EXTREELib::IColumnPtr)(spTree1->GetColumns()->Add(L"Column 1")))->PutHeaderStrikeOut(VARIANT_TRUE);
31. How can I apply an strikeout font only a portion of the column's header
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); ((EXTREELib::IColumnPtr)(spTree1->GetColumns()->Add(L"Column 1")))->PutHTMLCaption(L"<s>Col</s>umn 1");
30. How can I get underlined only a portion of column's header
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); ((EXTREELib::IColumnPtr)(spTree1->GetColumns()->Add(L"Column 1")))->PutHTMLCaption(L"<u>Col</u>umn 1");
29. How can I underline the column's header
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); ((EXTREELib::IColumnPtr)(spTree1->GetColumns()->Add(L"Column 1")))->PutHeaderUnderline(VARIANT_TRUE);
28. How can I apply an italic font only a portion of the column's header
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); ((EXTREELib::IColumnPtr)(spTree1->GetColumns()->Add(L"Column 1")))->PutHTMLCaption(L"<i>Col</i>umn 1");
27. Is there any option to make italic the column's header
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); ((EXTREELib::IColumnPtr)(spTree1->GetColumns()->Add(L"Column 1")))->PutHeaderItalic(VARIANT_TRUE);
26. How can I bold only a portion of the column's header
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); ((EXTREELib::IColumnPtr)(spTree1->GetColumns()->Add(L"Column 1")))->PutHTMLCaption(L"<b>Col</b>umn 1");
25. Is there any option to bold the column's header
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); ((EXTREELib::IColumnPtr)(spTree1->GetColumns()->Add(L"Column 1")))->PutHeaderBold(VARIANT_TRUE);
24. Why child items are not shown
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->PutLinesAtRoot(EXTREELib::exLinesAtRoot); spTree1->GetColumns()->Add(L"Column 1"); EXTREELib::IItemsPtr var_Items = spTree1->GetItems(); long h = var_Items->AddItem("Root"); var_Items->InsertItem(h,long(0),"Child 1"); var_Items->InsertItem(h,long(0),"Child 2"); var_Items->PutExpandItem(h,VARIANT_TRUE);
23. Does your control support partial-check ( three states ) feature for each column
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->PutLinesAtRoot(EXTREELib::exLinesAtRoot); EXTREELib::IColumnPtr var_Column = ((EXTREELib::IColumnPtr)(spTree1->GetColumns()->Add(L"P1"))); var_Column->PutDef(EXTREELib::exCellHasCheckBox,VARIANT_TRUE); var_Column->PutPartialCheck(VARIANT_TRUE); EXTREELib::IColumnPtr var_Column1 = ((EXTREELib::IColumnPtr)(spTree1->GetColumns()->Add(L"P2"))); var_Column1->PutDef(EXTREELib::exCellHasCheckBox,VARIANT_TRUE); var_Column1->PutPartialCheck(VARIANT_TRUE); EXTREELib::IItemsPtr var_Items = spTree1->GetItems(); long h = var_Items->AddItem("Root"); var_Items->InsertItem(h,long(0),"Child 1"); var_Items->InsertItem(h,long(0),"Child 2"); var_Items->PutExpandItem(h,VARIANT_TRUE);
22. Is there any option to change the color for the grid lines
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->GetColumns()->Add(L""); spTree1->PutDrawGridLines(EXTREELib::exAllLines); spTree1->PutGridLineColor(RGB(255,0,0));
21. Can I change the font to display the column's header
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->PutHeaderHeight(34); ((EXTREELib::IColumnPtr)(spTree1->GetColumns()->Add(L"Column 1")))->PutHTMLCaption(L"<font Tahoma;14>Column</font> 1");
20. Can I change the height of the header bar
/*
Copy and paste the following directives to your header file as
it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library'
#import <ExTree.dll>
using namespace EXTREELib;
*/
EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown();
spTree1->PutHeaderHeight(32);
19. Can I display multiple icons to the column's header
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->Images(_bstr_t("gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0") + "/oFBoVDolFo1HpFJpVLplNp1PqFRqVTqlVq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1" + "/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m0ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qO" + "x3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/y" + "NAOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA="); ((EXTREELib::IColumnPtr)(spTree1->GetColumns()->Add(L"Column 1")))->PutHTMLCaption(L"1<img>1</img> 2 <img>2</img>...");
18. How can I draw grid lines only for visible items
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->PutMarkSearchColumn(VARIANT_FALSE); spTree1->PutDrawGridLines(EXTREELib::exRowLines); spTree1->GetColumns()->Add(L"Column 1"); spTree1->GetColumns()->Add(L"Column 2"); spTree1->GetItems()->AddItem(long(0)); spTree1->GetItems()->AddItem(long(1)); spTree1->GetItems()->AddItem(long(2));
17. How can I show the control's grid lines
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->PutMarkSearchColumn(VARIANT_FALSE); spTree1->PutDrawGridLines(EXTREELib::exAllLines); spTree1->GetColumns()->Add(L"Column 1"); spTree1->GetColumns()->Add(L"Column 2"); spTree1->GetItems()->AddItem(long(0)); spTree1->GetItems()->AddItem(long(1)); spTree1->GetItems()->AddItem(long(2));
16. How can I assign a different background color for the entire column
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->PutMarkSearchColumn(VARIANT_FALSE); ((EXTREELib::IColumnPtr)(spTree1->GetColumns()->Add(L"Column 1")))->PutDef(EXTREELib::exCellBackColor,long(255)); spTree1->GetColumns()->Add(L"Column 2"); spTree1->GetItems()->AddItem(long(0)); spTree1->GetItems()->AddItem(long(1)); spTree1->GetItems()->AddItem(long(2));
15. How can I assign a check box for a cell
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->GetColumns()->Add(L"Column 1"); EXTREELib::IItemsPtr var_Items = spTree1->GetItems(); var_Items->AddItem(long(0)); var_Items->PutCellHasCheckBox(var_Items->AddItem(long(1)),long(0),VARIANT_TRUE); var_Items->AddItem(long(2));
14. How can I assign checkboxes for the entire column
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); ((EXTREELib::IColumnPtr)(spTree1->GetColumns()->Add(L"Column 1")))->PutDef(EXTREELib::exCellHasCheckBox,VARIANT_TRUE); spTree1->GetItems()->AddItem(long(0)); spTree1->GetItems()->AddItem(long(1)); spTree1->GetItems()->AddItem(long(2));
13. How can I show both scrollbars
/*
Copy and paste the following directives to your header file as
it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library'
#import <ExTree.dll>
using namespace EXTREELib;
*/
EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown();
spTree1->PutScrollBars(EXTREELib::exDisableBoth);
12. How can I change the column's width
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->PutColumnAutoResize(VARIANT_FALSE); ((EXTREELib::IColumnPtr)(spTree1->GetColumns()->Add(L"Column 1")))->PutWidth(64); ((EXTREELib::IColumnPtr)(spTree1->GetColumns()->Add(L"Column 2")))->PutWidth(128);
11. How can I show or hide a column
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); ((EXTREELib::IColumnPtr)(spTree1->GetColumns()->Add(L"Hidden")))->PutVisible(VARIANT_FALSE);
10. How can I hide the searching column
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->PutMarkSearchColumn(VARIANT_FALSE); spTree1->GetColumns()->Add(L"Column 1"); spTree1->GetColumns()->Add(L"Column 2"); spTree1->GetItems()->AddItem(vtMissing);
9. Can I disable sorting a column, when the user clicks the column's header, or drag it to the sort bar
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); ((EXTREELib::IColumnPtr)(spTree1->GetColumns()->Add(L"Unsortable")))->PutAllowSort(VARIANT_FALSE); spTree1->GetColumns()->Add(L"Sortable");
8. Is there any option to align the header to the left and the data to the right
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); ((EXTREELib::IColumnPtr)(spTree1->GetColumns()->Add(L"Left")))->PutAlignment(EXTREELib::LeftAlignment); EXTREELib::IColumnPtr var_Column = ((EXTREELib::IColumnPtr)(spTree1->GetColumns()->Add(L"Right"))); var_Column->PutAlignment(EXTREELib::RightAlignment); var_Column->PutHeaderAlignment(EXTREELib::RightAlignment); EXTREELib::IItemsPtr var_Items = spTree1->GetItems(); var_Items->PutCellCaption(var_Items->AddItem("left"),long(1),"right");
7. Can I displays a custom size picture to column's header
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->PutHTMLPicture(L"pic1","c:\\exontrol\\images\\zipdisk.gif"); spTree1->PutHeaderHeight(48); ((EXTREELib::IColumnPtr)(spTree1->GetColumns()->Add(L"ColumnName")))->PutHTMLCaption(L"<b>HTML</b> Column <img>pic1</img> Picture");
6. How can I insert an icon to column's header
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->Images(_bstr_t("gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0") + "/oFBoVDolFo1HpFJpVLplNp1PqFRqVTqlVq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1" + "/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m0ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qO" + "x3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/y" + "NAOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA="); ((EXTREELib::IColumnPtr)(spTree1->GetColumns()->Add(L"ColumnName")))->PutHTMLCaption(L"<b>HTML</b> Column <img>1</img> Icon");
5. How can I insert an icon to column's header
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); spTree1->Images(_bstr_t("gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0") + "/oFBoVDolFo1HpFJpVLplNp1PqFRqVTqlVq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1" + "/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m0ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qO" + "x3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/y" + "NAOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA="); ((EXTREELib::IColumnPtr)(spTree1->GetColumns()->Add(L"ColumnName")))->PutHeaderImage(1);
4. How can I use HTML format in column's header
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); ((EXTREELib::IColumnPtr)(spTree1->GetColumns()->Add(L"ColumnName")))->PutHTMLCaption(L"<b>HTML</b> <fgcolor=0000FF>Col</fgcolor>umn");
3. How can I change/rename the column's name
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); ((EXTREELib::IColumnPtr)(spTree1->GetColumns()->Add(L"ColumnName")))->PutCaption(L"NewName");
2. How can I add multiple columns
/* Copy and paste the following directives to your header file as it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library' #import <ExTree.dll> using namespace EXTREELib; */ EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown(); EXTREELib::IColumnsPtr var_Columns = spTree1->GetColumns(); var_Columns->Add(L"Column 1"); var_Columns->Add(L"Column 2");
1. How can I add a new column
/*
Copy and paste the following directives to your header file as
it defines the namespace 'EXTREELib' for the library: 'ExTree 1.0 Control Library'
#import <ExTree.dll>
using namespace EXTREELib;
*/
EXTREELib::ITreePtr spTree1 = GetDlgItem(IDC_TREE1)->GetControlUnknown();
spTree1->GetColumns()->Add(L"ColumnName");