455. How can I change the color, font, bold etc for the items/cells in the same column or for the entire column
With ComboBox1 .BeginUpdate .MarkSearchColumn = False With .ConditionalFormats.Add("1") .Bold = True .ForeColor = RGB(255,0,0) .ApplyTo = &H1 End With .Columns.Add "C1" With .Columns.Add("C2") .HeaderBold = True .HTMLCaption = "<fgcolor=FF0000>C2" End With With .Items .CellCaption(.AddItem(10),1) = 11 .CellCaption(.AddItem(12),1) = 13 End With .EndUpdate End With
454. How can I add a horizontal scroll bar
With ComboBox1 .BeginUpdate .ScrollBySingleLine = True .ColumnAutoResize = False .BackColorAlternate = RGB(240,240,240) With .Columns.Add("Default") .Width = 512 .Def(exCellSingleLine) = False End With With .Items .AddItem "Exontrol is devoted to create innovative user interface components for Windows applications, on" & _ " COM or .NET platforms, since 1999. ""eXontrol"" comes from e(s)pecial (c)ontrol, where sc makes" & _ " the X. We are a vendor not a reseller, and this is the single site where you can try or buy our" & _ " products. If you are tired of looking for ""powerful"" components now it's time to show you rea" & _ "l components. No registration required, no nag screens, no limitations, unlimited evaluation tim" & _ "e." .AddItem "A combo box is a commonly-used GUI tool. It is a combination of a drop-down list or list box an" & _ "d a single-line textbox, allowing the user either to type a value directly into the control or c" & _ "hoose from the list of existing options." End With .EndUpdate End With
453. Does the control have the option to have a horizontal scroll to show entries which are longer than the display
With ComboBox1 .BeginUpdate .ColumnAutoResize = False .Columns.Add("Default").Width = 512 With .Items .AddItem "Exontrol is devoted to create innovative user interface components for Windows applications, on" & _ " COM or .NET platforms, since 1999. ""eXontrol"" comes from e(s)pecial (c)ontrol, where sc makes" & _ " the X. We are a vendor not a reseller, and this is the single site where you can try or buy our" & _ " products. If you are tired of looking for ""powerful"" components now it's time to show you rea" & _ "l components. No registration required, no nag screens, no limitations, unlimited evaluation tim" & _ "e." .AddItem "A combo box is a commonly-used GUI tool. It is a combination of a drop-down list or list box an" & _ "d a single-line textbox, allowing the user either to type a value directly into the control or c" & _ "hoose from the list of existing options." End With .EndUpdate End With
452. Is it possible to auto-numbering the children items but still keeps the position after filtering
With ComboBox1 .BeginUpdate .LinesAtRoot = exLinesAtRoot With .Columns.Add("Items") .DisplayFilterButton = True .FilterType = exFilter .Filter = "Child 2" End With With .Columns.Add("Pos.1") .FormatColumn = "1 ropos ''" .Position = 0 .Width = 32 .AllowSizing = False End With With .Columns.Add("Pos.2") .FormatColumn = "1 ropos ':'" .Position = 1 .Width = 32 .AllowSizing = False End With With .Columns.Add("Pos.3") .FormatColumn = "1 ropos ':|A-Z'" .Position = 2 .Width = 32 .AllowSizing = False End With With .Columns.Add("Pos.4") .FormatColumn = "1 ropos '|A-Z|'" .Position = 3 .Width = 32 .AllowSizing = False End With With .Columns.Add("Pos.5") .FormatColumn = "'<font Tahoma;7>' + 1 ropos '-<b>||A-Z'" .Def(exCellCaptionFormat) = 1 .Position = 4 .Width = 32 .AllowSizing = False End With With .Columns.Add("Pos.6") .FormatColumn = "'<b>'+ 1 ropos '</b>:<fgcolor=FF0000>|A-Z|'" .Def(exCellCaptionFormat) = 1 .Position = 5 .Width = 48 .AllowSizing = False End With With .Items h = .AddItem("Root 1") .InsertItem h,0,"Child 1" .InsertItem h,0,"Child 2" .ExpandItem(h) = True h = .AddItem("Root 2") .InsertItem h,0,"Child 1" .InsertItem h,0,"Child 2" End With .ApplyFilter .EndUpdate End With
451. How do I prevent scrolling the control's data after user does the sort
With ComboBox1 .EnsureOnSort = False .Columns.Add "Column" With .Items .AddItem "Item 3" .AddItem "Item 1" .AddItem "Item 2" End With .PutItems .GetItems(0) .PutItems .GetItems(0) .PutItems .GetItems(0) .Columns.Item(0).SortOrder = SortAscending End With
450. Is it possible to auto-numbering the children items too
With ComboBox1 .BeginUpdate .LinesAtRoot = exLinesAtRoot .Columns.Add "Items" With .Columns.Add("Pos.1") .FormatColumn = "1 rpos ''" .Position = 0 .Width = 32 .AllowSizing = False End With With .Columns.Add("Pos.2") .FormatColumn = "1 rpos ':'" .Position = 1 .Width = 32 .AllowSizing = False End With With .Columns.Add("Pos.3") .FormatColumn = "1 rpos ':|A-Z'" .Position = 2 .Width = 32 .AllowSizing = False End With With .Columns.Add("Pos.4") .FormatColumn = "1 rpos '|A-Z|'" .Position = 3 .Width = 32 .AllowSizing = False End With With .Columns.Add("Pos.5") .FormatColumn = "'<font Tahoma;7>' + 1 rpos '-<b>||A-Z'" .Def(exCellCaptionFormat) = 1 .Position = 4 .Width = 32 .AllowSizing = False End With With .Columns.Add("Pos.6") .FormatColumn = "'<b>'+ 1 rpos '</b>:<fgcolor=FF0000>|A-Z|'" .Def(exCellCaptionFormat) = 1 .Position = 5 .Width = 48 .AllowSizing = False End With With .Items h = .AddItem("Root 1") .InsertItem h,0,"Child 1" .InsertItem h,0,"Child 2" .ExpandItem(h) = True h = .AddItem("Root 2") .InsertItem h,0,"Child 1" .InsertItem h,0,"Child 2" End With .EndUpdate End With
449. How can I show the child items with no identation
With ComboBox1 .LinesAtRoot = exGroupLinesOutside .Indent = 12 .HasLines = exThinLine .Columns.Add "Default" With .Items h = .AddItem("Root 1") .InsertItem h,0,"Child 1" .InsertItem h,0,"Child 2" .InsertItem h,0,"Child 3" .ExpandItem(h) = True h = .AddItem("Root 2") .InsertItem h,0,"Child 1" .InsertItem h,0,"Child 2" .InsertItem h,0,"Child 3" End With End With
448. Is there other ways of showing the hierarchy lines (exGroupLinesAtRoot)
With ComboBox1 .LinesAtRoot = exGroupLinesAtRoot .Indent = 12 .Columns.Add "Default" With .Items h = .AddItem("Root") .InsertItem h,0,"Child 1" .InsertItem h,0,"Child 2" .InsertItem h,0,"Child 3" .ExpandItem(h) = True End With End With
447. Is there other ways of showing the hierarchy lines (exGroupLinesOutside)
With ComboBox1 .LinesAtRoot = exGroupLinesOutside .Indent = 12 .Columns.Add "Default" With .Items h = .AddItem("Root 1") .InsertItem h,0,"Child 1" .InsertItem h,0,"Child 2" .InsertItem h,0,"Child 3" .ExpandItem(h) = True h = .AddItem("Root 2") .InsertItem h,0,"Child 1" .InsertItem h,0,"Child 2" .InsertItem h,0,"Child 3" End With End With
446. Is there other ways of showing the hierarchy lines (exGroupLinesInsideLeaf)
With ComboBox1 .LinesAtRoot = exGroupLinesInsideLeaf .Indent = 12 .Columns.Add "Default" With .Items h = .AddItem("Root") .InsertItem h,0,"Child 1" .InsertItem h,0,"Child 2" .InsertItem h,0,"Child 3" .ExpandItem(h) = True End With End With
445. Is there other ways of showing the hierarchy lines (exGroupLinesInside)
With ComboBox1 .LinesAtRoot = exGroupLinesInside .Indent = 12 .Columns.Add "Default" With .Items h = .AddItem("Root") .InsertItem h,0,"Child 1" .InsertItem h,0,"Child 2" .InsertItem h,0,"Child 3" .ExpandItem(h) = True End With End With
444. Is there other ways of showing the hierarchy lines (exGroupLines)
With ComboBox1 .LinesAtRoot = exGroupLines .Indent = 12 .Columns.Add "Default" With .Items h = .AddItem("Root") .InsertItem h,0,"Child 1" .InsertItem .InsertItem(h,0,"Child 2"),0,"SubChild 2" .InsertItem h,0,"Child 3" .ExpandItem(h) = True End With End With
443. Is it possible display numbers in the same format no matter of regional settings in the control panel
With ComboBox1 .BeginUpdate .Columns.Add("Def").Def(exCellCaptionFormat) = 1 With .Items h = .AddItem(100000.27) .FormatCell(h,0) = "(value format '') + ' <fgcolor=808080>(default positive)'" h = .AddItem(100000.27) .FormatCell(h,0) = "(value format '2|.|3|,|1|1')" h = .AddItem(-100000.27) .FormatCell(h,0) = "(value format '') + ' <fgcolor=808080>(default negative)'" h = .AddItem(-100000.27) .FormatCell(h,0) = "(value format '2|.|3|,|1|1')" End With .EndUpdate End With
442. Is it possible to add a 0 for numbers less than 1 instead .7 to show 0.8
With ComboBox1 .BeginUpdate .Columns.Add("Def").Def(exCellCaptionFormat) = 1 With .Items h = .AddItem(0.27) .FormatCell(h,0) = "(value format '') + ' <fgcolor=808080>(default)'" h = .AddItem(0.27) .FormatCell(h,0) = "(value format '|||||0') + ' <fgcolor=808080>(Display no leading zeros)'" End With .EndUpdate End With
441. How can I specify the format for negative numbers
With ComboBox1 .BeginUpdate .Columns.Add("Def").Def(exCellCaptionFormat) = 1 With .Items h = .AddItem(-100000.27) .FormatCell(h,0) = "(value format '') + ' <fgcolor=808080>(default)'" h = .AddItem(-100000.27) .FormatCell(h,0) = "(value format '||||1') + ' <fgcolor=808080>(Negative sign, number; for example, -1.1)'" End With .EndUpdate End With
440. Is it possible to change the grouping character when display numbers
With ComboBox1 .BeginUpdate .Columns.Add("Def").Def(exCellCaptionFormat) = 1 With .Items h = .AddItem(100000.27) .FormatCell(h,0) = "(value format '') + ' <fgcolor=808080>(default)'" h = .AddItem(100000.27) .FormatCell(h,0) = "(value format '|||-') + ' <fgcolor=808080>(grouping character is -)'" End With .EndUpdate End With
439. How can I display numbers with 2 digits in each group
With ComboBox1 .BeginUpdate .Columns.Add("Def").Def(exCellCaptionFormat) = 1 With .Items h = .AddItem(100000.27) .FormatCell(h,0) = "(value format '') + ' <fgcolor=808080>(default)'" h = .AddItem(100000.27) .FormatCell(h,0) = "(value format '||2') + ' <fgcolor=808080>(grouping by 2 digits)'" End With .EndUpdate End With
438. How can I display my numbers using a different decimal separator
With ComboBox1 .BeginUpdate .Columns.Add("Def").Def(exCellCaptionFormat) = 1 With .Items h = .AddItem(100.27) .FormatCell(h,0) = "(value format '') + ' <fgcolor=808080>(default)'" h = .AddItem(100.27) .FormatCell(h,0) = "(value format '|;') + ' <fgcolor=808080>(decimal separator is <b>;</b>)'" End With .EndUpdate End With
437. Is it possible to display the numbers using 3 (three) digits
With ComboBox1 .BeginUpdate .Columns.Add("Def").Def(exCellCaptionFormat) = 1 With .Items h = .AddItem(100.27) .FormatCell(h,0) = "(value format '') + ' <fgcolor=808080>(default)'" h = .AddItem(100.27) .FormatCell(h,0) = "(value format '3') + ' <fgcolor=808080>(3 digits)'" h = .AddItem(100.27) .FormatCell(h,0) = "(value format 2) + ' <fgcolor=808080>(2 digits)'" h = .AddItem(100.27) .FormatCell(h,0) = "(value format 1) + ' <fgcolor=808080>(1 digit)'" End With .EndUpdate End With
436. Is it possible to format numbers
With ComboBox1 .BeginUpdate .MarkSearchColumn = False With .Columns .Add "Name" With .Add("A") .SortType = SortNumeric .AllowSizing = False .Width = 36 .FormatColumn = "len(value) ? value + ' +'" End With With .Add("B") .SortType = SortNumeric .AllowSizing = False .Width = 36 .FormatColumn = "len(value) ? value + ' +'" End With With .Add("C") .SortType = SortNumeric .AllowSizing = False .Width = 36 .FormatColumn = "len(value) ? value + ' ='" End With With .Add("A+B+C") .SortType = SortNumeric .Width = 64 .ComputedField = "dbl(%1)+dbl(%2)+dbl(%3)" .FormatColumn = "type(value) in (0,1) ? 'null' : ( dbl(value)<0 ? '<fgcolor=FF0000>'+ (value format '2|.|3|,|1' " & _ ") : (dbl(value)>0 ? '<fgcolor=0000FF>+'+(value format '2|.|3|,' ): '0.00') )" .Def(exCellCaptionFormat) = 1 End With End With With .Items h = .AddItem("Root") .CellCaptionFormat(h,4) = exComputedField h1 = .InsertItem(h,0,"Child 1") .CellCaption(h1,1) = 7 .CellCaption(h1,2) = 3 .CellCaption(h1,3) = 1 h1 = .InsertItem(h,0,"Child 2") .CellCaption(h1,1) = -2 .CellCaption(h1,2) = -2 .CellCaption(h1,3) = -4 h1 = .InsertItem(h,0,"Child 3") .CellCaption(h1,1) = 2 .CellCaption(h1,2) = 2 .CellCaption(h1,3) = -4 .ExpandItem(h) = True End With .EndUpdate End With
435. Is it possible to limit the height of the item while resizing
' InsertItem event - Occurs after a new item has been inserted to Items collection. Private Sub ComboBox1_InsertItem(ByVal Item As EXCOMBOBOXLibCtl.HITEM) With ComboBox1 .Items.ItemMinHeight(Item) = 18 .Items.ItemMaxHeight(Item) = 72 End With End Sub With ComboBox1 .BeginUpdate .ItemsAllowSizing = exResizeItem .ScrollBySingleLine = False .BackColorAlternate = RGB(240,240,240) .Columns.Add "Names" With .Items .AddItem "Mantel" .AddItem "Mechanik" .AddItem "Motor" .AddItem "Murks" .AddItem "Märchen" .AddItem "Möhren" .AddItem "Mühle" End With .Columns.Item(0).SortOrder = SortAscending .EndUpdate End With
434. How can I simulate displaying groups
With ComboBox1 .HasLines = exNoLine .ScrollBySingleLine = True With .Columns .Add "Name" .Add "A" .Add "B" .Add "C" End With With .Items h = .AddItem("Group 1") .CellHAlignment(h,0) = CenterAlignment .ItemDivider(h) = 0 .ItemDividerLineAlignment(h) = DividerBoth .ItemHeight(h) = 24 .SortableItem(h) = False h1 = .InsertItem(h,0,"Child 1") .CellCaption(h1,1) = 1 .CellCaption(h1,2) = 2 .CellCaption(h1,3) = 3 h1 = .InsertItem(h,0,"Child 2") .CellCaption(h1,1) = 4 .CellCaption(h1,2) = 5 .CellCaption(h1,3) = 6 .ExpandItem(h) = True h = .AddItem("Group 2") .CellHAlignment(h,0) = CenterAlignment .ItemDivider(h) = 0 .ItemDividerLineAlignment(h) = DividerBoth .ItemHeight(h) = 24 .SortableItem(h) = False h1 = .InsertItem(h,0,"Child 1") .CellCaption(h1,1) = 1 .CellCaption(h1,2) = 2 .CellCaption(h1,3) = 3 h1 = .InsertItem(h,0,"Child 2") .CellCaption(h1,1) = 4 .CellCaption(h1,2) = 5 .CellCaption(h1,3) = 6 .ExpandItem(h) = True End With End With
433. How can I specify an item to be always the first item
With ComboBox1 .BeginUpdate .TreeColumnIndex = -1 .Columns.Add("Numbers").SortType = SortNumeric With .Items .AddItem 1 .AddItem 2 .AddItem 3 .AddItem 4 h = .AddItem("first") .ItemPosition(h) = 0 .CellHAlignment(h,0) = RightAlignment .SortableItem(h) = False .SortChildren 0,0,False End With .EndUpdate End With
432. How can I specify an item to be always the last item
With ComboBox1 .BeginUpdate .TreeColumnIndex = -1 .Columns.Add("Numbers").SortType = SortNumeric With .Items .AddItem 1 .AddItem 2 .AddItem 3 .AddItem 4 h = .AddItem("last") .CellHAlignment(h,0) = RightAlignment .SortableItem(h) = False .SortChildren 0,0,True End With .EndUpdate End With
431. Can I allow sorting only the child items
With ComboBox1 .BeginUpdate .Columns.Add "Childs" With .Items h = .AddItem("Root 1") .SortableItem(h) = False .InsertItem h,0,"Child 1" .InsertItem h,0,"Child 2" .ExpandItem(h) = True h = .AddItem("Root 2") .SortableItem(h) = False .InsertItem h,0,"Child 1" .InsertItem h,0,"Child 2" .ExpandItem(h) = True End With .EndUpdate End With
430. Can I specify a terminal item so it will mark the end of childs
With ComboBox1 .BeginUpdate .ScrollBySingleLine = True .Columns.Add "P1" With .Items h = .AddItem("Root 1") .InsertItem h,0,"Child 1" .InsertItem h,0,"Child 2" .ExpandItem(h) = True h = .InsertItem(h,"","") .ItemDivider(h) = 0 .ItemDividerLineAlignment(h) = DividerCenter .ItemHeight(h) = 2 .SelectableItem(h) = False .SortableItem(h) = False h = .AddItem("Root 2") .InsertItem h,0,"Child 1" .InsertItem h,0,"Child 2" .ExpandItem(h) = True h = .InsertItem(h,"","") .ItemDivider(h) = 0 .ItemDividerLineAlignment(h) = DividerCenter .ItemHeight(h) = 2 .SelectableItem(h) = False .SortableItem(h) = False End With .EndUpdate End With
429. Is it possible to specify an item being unsortable so its position won't be changed after sorting
With ComboBox1 .BeginUpdate .TreeColumnIndex = -1 .Columns.Add("Numbers").SortType = SortNumeric With .Items .AddItem 1 .AddItem 2 .AddItem 3 .AddItem 4 h = .AddItem("top 3") .ItemPosition(h) = 3 .CellHAlignment(h,0) = RightAlignment .SortableItem(h) = False .SortChildren 0,0,False End With .EndUpdate End With
428. Can I specify an item to be a separator
With ComboBox1 .BeginUpdate .TreeColumnIndex = -1 .SortOnClick = exNoSort .Columns.Add "Numbers" With .Items .AddItem 1 .AddItem 2 h = .AddItem("separator") .SelectableItem(h) = False .ItemDivider(h) = 0 .ItemDividerLineAlignment(h) = DividerCenter .ItemDividerLine(h) = ThinLine .CellHAlignment(h,0) = CenterAlignment .AddItem 3 .AddItem 4 End With .EndUpdate End With
427. How can I collapse all items
With ComboBox1 .BeginUpdate .LinesAtRoot = exLinesAtRoot .Columns.Add "Items" With .Items h = .AddItem("Root 1") .InsertItem h,0,"Child 1" .InsertItem h,0,"Child 2" h = .AddItem("Root 2") .InsertItem h,0,"Child 1" .InsertItem h,0,"Child 2" .ExpandItem(0) = False End With .EndUpdate End With
426. How can I expand all items
With ComboBox1 .BeginUpdate .LinesAtRoot = exLinesAtRoot .Columns.Add "Items" With .Items h = .AddItem("Root 1") .InsertItem h,0,"Child 1" .InsertItem h,0,"Child 2" h = .AddItem("Root 2") .InsertItem h,0,"Child 1" .InsertItem h,0,"Child 2" .ExpandItem(0) = True End With .EndUpdate End With
425. Is it possible to specify the cell's value but still want to display some formatted text instead the value
With ComboBox1 .BeginUpdate .MarkSearchColumn = False .Columns.Add "Value" .Columns.Add "FormatCell" With .Items h = .AddItem(1) .CellCaption(h,1) = 12 .FormatCell(h,1) = "currency(value)" h = .AddItem(#1/1/2001#) .CellCaption(h,1) = #1/1/2001# .CellCaptionFormat(h,1) = exHTML .FormatCell(h,1) = "longdate(value) replace '2001' with '<b>2001</b>'" End With .EndUpdate End With
424. How can I change the foreground color for a particular column
With ComboBox1 With .Columns .Add "Column 1" .Add("Column 2").Def(exHeaderForeColor) = 8439039 .Add "Column 3" End With End With
423. How can I change the background color for a particular column
With ComboBox1 With .Columns .Add "Column 1" .Add("Column 2").Def(exHeaderBackColor) = 8439039 .Add "Column 3" End With End With
422. How can I display the column using currency format and enlarge the font for certain values
With ComboBox1 With .Columns.Add("Currency") .Def(exCellCaptionFormat) = 1 .FormatColumn = "len(value) ? ((0:=dbl(value)) < 10 ? '<fgcolor=808080><font ;7>' : '<b>') + currency(=:0)" End With With .Items .AddItem "1.23" .AddItem "2.34" .AddItem "9.94" .AddItem "11.94" .AddItem "1000" End With End With
421. How can I highlight only parts of the cells
With ComboBox1 With .Columns.Add("") .Def(exCellCaptionFormat) = 1 .FormatColumn = "value replace 'hil' with '<fgcolor=FF0000><b>hil</b></fgcolor>'" End With With .Items h = .AddItem("Root") .InsertItem h,0,"Child 1" .InsertItem h,0,"Child 2" .InsertItem h,0,"Child 3" .ExpandItem(h) = True End With End With
420. How can I get the number of occurrences of a specified string in the cell
With ComboBox1 .Columns.Add "" With .Columns.Add("occurrences") .ComputedField = "lower(%0) count 'o'" .FormatColumn = "'contains ' + value + ' of \'o\' chars'" End With With .Items h = .AddItem("Root") .InsertItem h,0,"Child 1 oooof the root" .InsertItem h,0,"Child 2" .InsertItem h,0,"Child 3" .ExpandItem(h) = True End With End With
419. How can I display dates in my format
With ComboBox1 With .Columns.Add("Date") .Def(exCellCaptionFormat) = 1 .FormatColumn = "'<b>' + year(0:=date(value)) + '</b><fgcolor=808080><font ;6> (' + month(=:0) + ' - ' + day(=:0" & _ ") +')'" End With With .Items .AddItem #1/21/2001# .AddItem #2/22/2002# .AddItem #3/13/2003# .AddItem #4/24/2004# End With End With
418. How can I display dates in short format
With ComboBox1 .Columns.Add("Date").FormatColumn = "shortdate(value)" With .Items .AddItem #1/1/2001# .AddItem #2/2/2002# .AddItem #3/3/2003# .AddItem #4/4/2004# End With End With
417. How can I display dates in long format
With ComboBox1 .Columns.Add("Date").FormatColumn = "longdate(value)" With .Items .AddItem #1/1/2001# .AddItem #2/2/2002# .AddItem #3/3/2003# .AddItem #4/4/2004# End With End With
416. How can I display only the right part of the cell
With ComboBox1 .Columns.Add "" With .Columns.Add("Right") .ComputedField = "%0 right 2" .FormatColumn = "'""' + value + '""'" End With With .Items h = .AddItem("Root") .InsertItem h,0,"Child 1" .InsertItem h,0,"Child 2" .InsertItem h,0,"SChild 3" .ExpandItem(h) = True End With End With
415. How can I display true or false instead 0 and -1
With ComboBox1 .Columns.Add("Boolean").FormatColumn = "value != 0 ? 'true' : 'false'" With .Items .AddItem True .AddItem False .AddItem True .AddItem 0 .AddItem 1 End With End With
414. How can I display icons or images instead numbers
With ComboBox1 .Images "gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0" & _ "/oFBoVDolFo1HpFJpVLplNp1PqFRqVTqlVq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1" & _ "/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m0ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qO" & _ "x3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/y" & _ "NAOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA=" With .Columns.Add("Icons") .Def(exCellCaptionFormat) = 1 .FormatColumn = "'The cell displays the icon <img>'+value+'</img> instead ' + value" End With With .Items .AddItem 1 .AddItem 2 .AddItem 3 End With End With
413. How can I display the column using currency
With ComboBox1 .Columns.Add("Currency").FormatColumn = "currency(dbl(value))" With .Items .AddItem "1.23" .AddItem "2.34" .AddItem "0" .AddItem 5 .AddItem "10000.99" End With End With
412. How can I filter programatically using more columns
With ComboBox1 .BeginUpdate .MarkSearchColumn = False With .Columns .Add "Car" .Add "Equipment" End With With .Items .CellCaption(.AddItem("Mazda"),1) = "Air Bag" .CellCaption(.AddItem("Toyota"),1) = "Air Bag,Air condition" .CellCaption(.AddItem("Ford"),1) = "Air condition" .CellCaption(.AddItem("Nissan"),1) = "Air Bag,ABS,ESP" .CellCaption(.AddItem("Mazda"),1) = "Air Bag, ABS,ESP" .CellCaption(.AddItem("Mazda"),1) = "ABS,ESP" End With With .Columns.Item("Car") .FilterType = exFilter .Filter = "Mazda" End With With .Columns.Item("Equipment") .FilterType = exPattern .Filter = "*ABS*|*ESP*" End With .ApplyFilter .EndUpdate End With
411. I need a combobox that supports selecting multiple items, preferably with checkboxes. I can't find an example of how to do this. Does your control support it
' CellStateChanged event - Fired after cell's state has been changed. Private Sub ComboBox1_CellStateChanged(ByVal Cell As EXCOMBOBOXLibCtl.HCELL) With ComboBox1 .LabelText = Cell Debug.Print( .Items.CellCaption(0,Cell) ) Debug.Print( .Items.CellState(0,Cell) ) End With End Sub With ComboBox1 .BeginUpdate .Style = DropDownList .IntegralHeight = True .HeaderVisible = False .SingleEdit = True .SearchColumnIndex = -1 .AdjustSearchColumn = False .Columns.Add("Language").Def(exCellHasCheckBox) = True With .Items .AddItem "English" .AddItem "Hebrew" .AddItem "Spanish" End With .EndUpdate End With
410. How can I display a different caption in the label area, when I click the cell's check box
' CellStateChanged event - Fired after cell's state has been changed. Private Sub ComboBox1_CellStateChanged(ByVal Cell As EXCOMBOBOXLibCtl.HCELL) With ComboBox1 .LabelText = Cell Debug.Print( .Items.CellCaption(0,Cell) ) Debug.Print( .Items.CellState(0,Cell) ) End With End Sub With ComboBox1 .BeginUpdate .Style = DropDownList .IntegralHeight = True .HeaderVisible = False .SingleEdit = True .SearchColumnIndex = -1 .AdjustSearchColumn = False .Columns.Add("Language").Def(exCellHasCheckBox) = True With .Items .AddItem "English" .AddItem "Hebrew" .AddItem "Spanish" End With .LabelText = " <b>custom</b> text " .EndUpdate End With
409. How can I display a different caption in the label area
With ComboBox1 .BeginUpdate .Style = DropDownList .IntegralHeight = True .HeaderVisible = False .SingleEdit = True .SearchColumnIndex = -1 .AdjustSearchColumn = False .Columns.Add("Language").Def(exCellHasCheckBox) = True With .Items .AddItem "English" .AddItem "Hebrew" .AddItem "Spanish" End With .LabelText = " <b>custom</b> text " .EndUpdate End With
408. How can I change the background appearance (ebn) for the filter field in the bottom part of the drop down portion
With ComboBox1 .BeginUpdate .VisualAppearance.Add 1,"c:\exontrol\images\normal.ebn" .FilterForVisible = True .FilterForBackColor = &H1000000 .IntegralHeight = True .Columns.Add "Default" With .Items .AddItem "Item 1" .AddItem "Item 2" .AddItem "Item 3" .AddItem "Item 4" .AddItem "Item 5" End With .EndUpdate End With
407. How can I change the background color for the filter field in the bottom part of the drop down portion
With ComboBox1 .BeginUpdate .FilterForVisible = True .FilterForBackColor = RGB(240,240,240) .IntegralHeight = True .Columns.Add "Default" With .Items .AddItem "Item 1" .AddItem "Item 2" .AddItem "Item 3" .AddItem "Item 4" .AddItem "Item 5" End With .EndUpdate End With
406. How can I display a filter field in the bottom part of the drop down portion
With ComboBox1 .BeginUpdate .FilterForVisible = True .IntegralHeight = True .Columns.Add "Default" With .Items .AddItem "Item 1" .AddItem "Item 2" .AddItem "Item 3" .AddItem "Item 4" .AddItem "Item 5" End With .EndUpdate End With
405. Does your control support RightToLeft property for RTL languages or right to left
With ComboBox1 .BeginUpdate .LinesAtRoot = exLinesAtRoot With .Columns.Add("P1") .Def(exCellHasCheckBox) = True .PartialCheck = True End With With .Items h = .AddItem("Root") .InsertItem h,0,"Child 1" .InsertItem h,0,"Child 2" .ExpandItem(h) = True End With .RightToLeft = True .EndUpdate End With
404. Is there any way to display the vertical scroll bar on the left side, as I want to align my data to the right
With ComboBox1 .BeginUpdate With .Columns .Add "C1" .Add "C2" .Add "C3" .Add "C4" .Add "C5" .Add "C6" .Add "C7" .Add "C8" End With .RightToLeft = True .EndUpdate End With
403. Can I display the cell's check box after the text
With ComboBox1 With .Columns.Add("Column") .Def(exCellHasCheckBox) = True .Def(exCellDrawPartsOrder) = "caption,check" End With With .Items .CellHasCheckBox(.AddItem("Caption 1"),0) = True .CellHasCheckBox(.AddItem("Caption 2"),0) = True End With End With
402. Can I change the order of the parts in the cell, as checkbox after the text, and so on
With ComboBox1 .Images "gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0" & _ "/oFBoVDolFo1HpFJpVLplNp1PqFRqVTqlVq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1" & _ "/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m0ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qO" & _ "x3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/y" & _ "NAOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA=" .Columns.Add("Column").Def(exCellDrawPartsOrder) = "caption,check,icon,icons,picture" With .Items h = .AddItem("Text") .CellImage(h,0) = 1 .CellHasCheckBox(h,0) = True End With End With
401. Can I have an image displayed after the text. Can I get that effect without using HTML content
With ComboBox1 .Images "gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0" & _ "/oFBoVDolFo1HpFJpVLplNp1PqFRqVTqlVq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1" & _ "/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m0ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qO" & _ "x3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/y" & _ "NAOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA=" .Columns.Add("Column").Def(exCellDrawPartsOrder) = "caption,icon,check,icons,picture" With .Items h = .AddItem("Text") .CellImage(h,0) = 1 End With End With
400. How can I display the column using currency format and enlarge the font for certain values
With ComboBox1 With .Columns.Add("Currency") .Def(exCellCaptionFormat) = 1 .FormatColumn = "len(value) ? ((0:=dbl(value)) < 10 ? '<fgcolor=808080><font ;7>' : '<b>') + currency(=:0)" End With With .Items .AddItem "1.23" .AddItem "2.34" .AddItem "9.94" .AddItem "11.94" .AddItem "1000" End With End With
399. How can I get the number of occurrences of a specified string in the cell
With ComboBox1 .Columns.Add "" With .Columns.Add("occurrences") .ComputedField = "lower(%0) count 'o'" .FormatColumn = "'contains ' + value + ' of \'o\' chars'" End With With .Items h = .AddItem("Root") .InsertItem h,0,"Child 1 oooof the root" .InsertItem h,0,"Child 2" .InsertItem h,0,"Child 3" .ExpandItem(h) = True End With End With
398. How can I display dates in my format
With ComboBox1 With .Columns.Add("Date") .Def(exCellCaptionFormat) = 1 .FormatColumn = "'<b>' + year(0:=date(value)) + '</b><fgcolor=808080><font ;6> (' + month(=:0) + ' - ' + day(=:0" & _ ") +')'" End With With .Items .AddItem #1/21/2001# .AddItem #2/22/2002# .AddItem #3/13/2003# .AddItem #4/24/2004# End With End With
397. How can I display dates in short format
With ComboBox1 .Columns.Add("Date").FormatColumn = "shortdate(value)" With .Items .AddItem #1/1/2001# .AddItem #2/2/2002# .AddItem #3/3/2003# .AddItem #4/4/2004# End With End With
396. How can I display dates in long format
With ComboBox1 .Columns.Add("Date").FormatColumn = "longdate(value)" With .Items .AddItem #1/1/2001# .AddItem #2/2/2002# .AddItem #3/3/2003# .AddItem #4/4/2004# End With End With
395. How can I display only the right part of the cell
With ComboBox1 .Columns.Add "" With .Columns.Add("Right") .ComputedField = "%0 right 2" .FormatColumn = "'""' + value + '""'" End With With .Items h = .AddItem("Root") .InsertItem h,0,"Child 1" .InsertItem h,0,"Child 2" .InsertItem h,0,"SChild 3" .ExpandItem(h) = True End With End With
394. How can I display only the left part of the cell
With ComboBox1 .Columns.Add "" .Columns.Add("Left").ComputedField = "%0 left 2" With .Items h = .AddItem("Root") .InsertItem h,0,"Child 1" .InsertItem h,0,"Child 2" .InsertItem h,0,"SChild 3" .ExpandItem(h) = True End With End With
393. How can I display true or false instead 0 and -1
With ComboBox1 .Columns.Add("Boolean").FormatColumn = "value != 0 ? 'true' : 'false'" With .Items .AddItem True .AddItem False .AddItem True .AddItem 0 .AddItem 1 End With End With
392. How can I display icons or images instead numbers
With ComboBox1 .Images "gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0" & _ "/oFBoVDolFo1HpFJpVLplNp1PqFRqVTqlVq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1" & _ "/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m0ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qO" & _ "x3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/y" & _ "NAOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA=" With .Columns.Add("Icons") .Def(exCellCaptionFormat) = 1 .FormatColumn = "'The cell displays the icon <img>'+value+'</img> instead ' + value" End With With .Items .AddItem 1 .AddItem 2 .AddItem 3 End With End With
391. How can I display the column using currency
With ComboBox1 .Columns.Add("Currency").FormatColumn = "currency(dbl(value))" With .Items .AddItem "1.23" .AddItem "2.34" .AddItem "0" .AddItem 5 .AddItem "10000.99" End With End With
390. How can I display the currency only for not empty cells
With ComboBox1 .Columns.Add "Number" .Columns.Add("Currency").ComputedField = "len(%0) ? currency(dbl(%0)) : ''" With .Items .AddItem "1.23" .AddItem "2.34" .AddItem "0" .ItemBackColor(.AddItem()) = RGB(255,128,128) .AddItem "10000.99" End With End With
389. Is there a function to display the number of days between two date including the number of hours
With ComboBox1 .Columns.Add("Start").Width = 32 .Columns.Add "End" .Columns.Add("Duration").ComputedField = "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)' : '' )" With .Items h = .AddItem(#1/11/2001#) .CellCaption(h,1) = #1/14/2001# h = .AddItem(#2/22/2002 0:00:00 PM#) .CellCaption(h,1) = #3/14/2002 1:00:00 PM# h = .AddItem(#3/13/2003#) .CellCaption(h,1) = #4/11/2003 11:00:00 AM# End With End With
388. Is there a function to display the number of days between two date including the number of hours
With ComboBox1 .Columns.Add "Start" .Columns.Add "End" .Columns.Add("Duration").ComputedField = """D "" + int(date(%1)-date(%0)) + "" H "" + round(24*(date(%1)-date(%0) - floor(date(%1)-date(%" & _ "0))))" With .Items h = .AddItem(#1/11/2001#) .CellCaption(h,1) = #1/14/2001 11:00:00 PM# h = .AddItem(#2/22/2002 0:00:00 PM#) .CellCaption(h,1) = #3/14/2002 1:00:00 PM# h = .AddItem(#3/13/2003#) .CellCaption(h,1) = #4/11/2003 11:00:00 AM# End With End With
387. How can I display the number of days between two dates
With ComboBox1 .Columns.Add "Start" .Columns.Add "End" .Columns.Add("Duration").ComputedField = "(date(%1)-date(%0)) + ' days'" With .Items h = .AddItem(#1/11/2001#) .CellCaption(h,1) = #1/14/2001# h = .AddItem(#2/22/2002#) .CellCaption(h,1) = #3/14/2002# h = .AddItem(#3/13/2003#) .CellCaption(h,1) = #4/11/2003# End With End With
386. How can I get second part of the date
With ComboBox1 .Columns.Add "Date" .Columns.Add("Second").ComputedField = "sec(date(%0))" With .Items .AddItem #1/11/2001 10:10:00 AM# .AddItem #2/22/2002 11:01:22 AM# .AddItem #3/13/2003 0:23:01 PM# .AddItem #4/14/2004 1:11:59 PM# End With End With
385. How can I get minute part of the date
With ComboBox1 .Columns.Add "Date" .Columns.Add("Minute").ComputedField = "min(date(%0))" With .Items .AddItem #1/11/2001 10:10:00 AM# .AddItem #2/22/2002 11:01:00 AM# .AddItem #3/13/2003 0:23:00 PM# .AddItem #4/14/2004 1:11:00 PM# End With End With
384. How can I check the hour part only so I know it was afternoon
With ComboBox1 .ConditionalFormats.Add("hour(%0)>=12").Bold = True .Columns.Add "Date" .Columns.Add("Hour").ComputedField = "hour(%0)" With .Items .AddItem #1/11/2001 10:00:00 AM# .AddItem #2/22/2002 11:00:00 AM# .AddItem #3/13/2003 0:00:00 PM# .AddItem #4/14/2004 1:00:00 PM# End With End With
383. What about a function to get the day in the week, or days since Sunday
With ComboBox1 .Columns.Add "Date" .Columns.Add("WeekDay").ComputedField = "weekday(%0)" With .Items .AddItem #1/11/2001 10:00:00 AM# .AddItem #2/22/2002 11:00:00 AM# .AddItem #3/13/2003 0:00:00 PM# .AddItem #4/14/2004 1:00:00 PM# End With End With
382. Is there any function to get the day of the year or number of days since January 1st
With ComboBox1 .Columns.Add "Date" .Columns.Add("Day since January 1st").ComputedField = "yearday(%0)" With .Items .AddItem #1/11/2001 10:00:00 AM# .AddItem #2/22/2002 11:00:00 AM# .AddItem #3/13/2003 0:00:00 PM# .AddItem #4/14/2004 1:00:00 PM# End With End With
381. How can I display only the day of the date
With ComboBox1 .Columns.Add "Date" .Columns.Add("Day").ComputedField = "day(%0)" With .Items .AddItem #1/11/2001 10:00:00 AM# .AddItem #2/22/2002 11:00:00 AM# .AddItem #3/13/2003 0:00:00 PM# .AddItem #4/14/2004 1:00:00 PM# End With End With
380. How can I display only the month of the date
With ComboBox1 .Columns.Add "Date" .Columns.Add("Month").ComputedField = "month(%0)" With .Items .AddItem #1/1/2001 10:00:00 AM# .AddItem #2/2/2002 11:00:00 AM# .AddItem #3/3/2003 0:00:00 PM# .AddItem #4/4/2004 1:00:00 PM# End With End With
379. How can I get only the year part from a date expression
With ComboBox1 .Columns.Add "Date" .Columns.Add("Year").ComputedField = "year(%0)" With .Items .AddItem #1/1/2001 10:00:00 AM# .AddItem #2/2/2002 11:00:00 AM# .AddItem #3/3/2003 0:00:00 PM# .AddItem #4/4/2004 1:00:00 PM# End With End With
378. Can I convert the expression to date
With ComboBox1 .Columns.Add "Number" .Columns.Add("Date").ComputedField = "date(dbl(%0))" With .Items .AddItem "-1.98" .AddItem "30000.99" .AddItem "3561.23" .AddItem "1232.34" End With End With
377. Can I convert the expression to a number, double or float
With ComboBox1 .Columns.Add "Number" .Columns.Add("Number + 2").ComputedField = "dbl(%0)+2" With .Items .AddItem "-1.98" .AddItem "0.99" .AddItem "1.23" .AddItem "2.34" End With End With
376. How can I display dates in long format
With ComboBox1 .Columns.Add "Date" .Columns.Add("LongFormat").ComputedField = "longdate(%0)" With .Items .AddItem #1/1/2001 10:00:00 AM# .AddItem #2/2/2002 11:00:00 AM# .AddItem #3/3/2003 0:00:00 PM# .AddItem #4/4/2004 1:00:00 PM# End With End With
375. How can I display dates in short format
With ComboBox1 .Columns.Add "Date" .Columns.Add("ShortFormat").ComputedField = "shortdate(%0)" With .Items .AddItem #1/1/2001 10:00:00 AM# .AddItem #2/2/2002 11:00:00 AM# .AddItem #3/3/2003 0:00:00 PM# .AddItem #4/4/2004 1:00:00 PM# End With End With
374. How can I display the time only of a date expression
With ComboBox1 .Columns.Add "Date" .Columns.Add("Time").ComputedField = "'time is:' + time(date(%0))" With .Items .AddItem #1/1/2001 10:00:00 AM# .AddItem #2/2/2002 11:00:00 AM# .AddItem #3/3/2003 0:00:00 PM# .AddItem #4/4/2004 1:00:00 PM# End With End With
373. Is there any function to display currencies, or money formatted as in the control panel
With ComboBox1 .Columns.Add "Number" .Columns.Add("Currency").ComputedField = "currency(dbl(%0))" With .Items .AddItem "1.23" .AddItem "2.34" .AddItem "10000.99" End With End With
372. How can I convert the expression to a string so I can look into the date string expression for month's name
With ComboBox1 .Columns.Add "Number" .Columns.Add("Str").ComputedField = "str(%0) + ' AA'" With .Items .AddItem "-1.98" .AddItem "0.99" .AddItem "1.23" .AddItem "2.34" End With End With
371. Can I display the absolute value or positive part of the number
With ComboBox1 .Columns.Add "Number" .Columns.Add("Abs").ComputedField = "abs(%0)" With .Items .AddItem "-1.98" .AddItem "0.99" .AddItem "1.23" .AddItem "2.34" End With End With
370. Is there any function to get largest number with no fraction part that is not greater than the value
With ComboBox1 .Columns.Add "Number" .Columns.Add("Floor").ComputedField = "floor(%0)" With .Items .AddItem "-1.98" .AddItem "0.99" .AddItem "1.23" .AddItem "2.34" End With End With
369. Is there any function to round the values base on the .5 value
With ComboBox1 .Columns.Add "Number" .Columns.Add("Round").ComputedField = "round(%0)" With .Items .AddItem "-1.98" .AddItem "0.99" .AddItem "1.23" .AddItem "2.34" End With End With
368. How can I get or display the integer part of the cell
With ComboBox1 .Columns.Add "Number" .Columns.Add("Int").ComputedField = "int(%0)" With .Items .AddItem "-1.98" .AddItem "0.99" .AddItem "1.23" .AddItem "2.34" End With End With
367. How can I display names as proper ( first leter of the word must be in uppercase, and the rest in lowercase )
With ComboBox1 .Columns.Add("").ComputedField = "proper(%0)" With .Items h = .AddItem("root") .InsertItem h,0,"child child" .InsertItem h,0,"child child" .InsertItem h,0,"child child" .ExpandItem(h) = True End With End With
366. Is there any option to display cells in uppercase
With ComboBox1 .Columns.Add("").ComputedField = "upper(%0)" With .Items h = .AddItem("Root") .InsertItem h,0,"Child 1" .InsertItem h,0,"Child 2" .InsertItem h,0,"Chld 3" .ExpandItem(h) = True End With End With
365. Is there any option to display cells in lowercase
With ComboBox1 .Columns.Add("").ComputedField = "lower(%0)" With .Items h = .AddItem("Root") .InsertItem h,0,"Child 1" .InsertItem h,0,"Child 2" .InsertItem h,0,"Chld 3" .ExpandItem(h) = True End With End With
364. How can I mark the cells that has a specified type, ie strings only
With ComboBox1 .ConditionalFormats.Add("type(%0) = 8").ForeColor = RGB(255,0,0) .Columns.Add "" With .Items h = .AddItem("Root") .InsertItem h,0,"Child 1" .InsertItem h,0,2 .InsertItem h,0,"Chld 3" .ExpandItem(h) = True End With End With
363. How can I bold the items that contains data or those who displays empty strings
With ComboBox1 .ConditionalFormats.Add("not len(%1)=0").Bold = True .Columns.Add "C1" .Columns.Add "C2" With .Items h = .AddItem("Root") .InsertItem h,0,"Child 1" hC = .InsertItem(h,0,"Child 2") .CellCaption(hC,1) = "1" .InsertItem h,0,"Child 3" .ExpandItem(h) = True End With End With
362. Can I change the background color for items or cells that contains a specified string
With ComboBox1 .ConditionalFormats.Add("%0 contains 'hi'").BackColor = RGB(255,0,0) .Columns.Add "" With .Items h = .AddItem("Root") .InsertItem h,0,"Child 1" .InsertItem h,0,"Child 2" .InsertItem h,0,"Chld 3" .ExpandItem(h) = True End With End With
361. Is there any option to change the fore color for cells or items that ends with a specified string
With ComboBox1 .ConditionalFormats.Add("%0 endwith '22'").ForeColor = RGB(255,0,0) .Columns.Add "" With .Items h = .AddItem("Root") .InsertItem h,0,"Child 1" .InsertItem h,0,"Child 1.22" .InsertItem h,0,"Child 2.22" .ExpandItem(h) = True End With End With
360. How can I highlight the cells or items that starts with a specified string
With ComboBox1 .ConditionalFormats.Add("%0 startwith 'C'").Underline = True .Columns.Add "" With .Items h = .AddItem("Root") .InsertItem h,0,"Child 1" .InsertItem h,0,"Child 2" .InsertItem h,0,"SChild 3" .ExpandItem(h) = True End With End With
359. How can I change the background color or the visual appearance using ebn for a particular column
With ComboBox1 .VisualAppearance.Add 1,"c:\exontrol\images\normal.ebn" With .Columns .Add "Column 1" .Add("Column 2").Def(exHeaderBackColor) = 16777216 .Add("Column 3").Def(exHeaderBackColor) = 16777471 .Add "Column 4" End With End With
358. How can I change the background color for a particular column
With ComboBox1 With .Columns .Add "Column 1" .Add("Column 2").Def(exHeaderBackColor) = 8439039 .Add "Column 3" End With End With
357. Does your control support prompt feature
With ComboBox1 .Images "gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0" & _ "/oFBoVDolFo1HpFJpVLplNp1PqFRqVTqlVq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1" & _ "/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m0ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qO" & _ "x3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/y" & _ "NAOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA=" .AutoComplete = False .Columns.Add("Column 1").Prompt = "<img>1</img><i><fgcolor=808080>type to search</fgcolor></i>" .Items.AddItem 0 .Items.AddItem 1 .Items.AddItem 2 End With
356. How can I display the column's header using multiple lines
With ComboBox1 .HeaderHeight = 128 .HeaderSingleLine = False .Columns.Add("This is just a column that should break the header.").Width = 32 .Columns.Add "This is just another column that should break the header." End With
355. How can I sort the value gets listed in the drop down filter window
With ComboBox1 .LinesAtRoot = exLinesAtRoot .MarkSearchColumn = False .Description(exFilterBarAll) = "" .Description(exFilterBarBlanks) = "" .Description(exFilterBarNonBlanks) = "" With .Columns.Add("P1") .DisplayFilterButton = True .DisplayFilterPattern = False .FilterList = exSortItemsDesc End With With .Columns.Add("P2") .DisplayFilterButton = True .DisplayFilterPattern = False .FilterList = exSortItemsAsc End With With .Items h = .AddItem("Z3") .CellCaption(h,1) = "C" .CellCaption(.InsertItem(h,0,"Z1"),1) = "B" .CellCaption(.InsertItem(h,0,"Z2"),1) = "A" .ExpandItem(h) = True End With End With
354. Is there any property to disable the popup/context menu being shown when the user does a right click in the control's label area
With ComboBox1 .Columns.Add("Default").AllowEditContextMenu = False .Items.AddItem 0 .Items.AddItem 1 .Items.AddItem 2 End With
353. How can I align the text/caption on the scroll bar
With ComboBox1 .ScrollPartCaption(exHScroll,exLowerBackPart) = "left" .ScrollPartCaptionAlignment(exHScroll,exLowerBackPart) = LeftAlignment .ScrollPartCaption(exHScroll,exUpperBackPart) = "right" .ScrollPartCaptionAlignment(exHScroll,exUpperBackPart) = RightAlignment .ColumnAutoResize = False .Columns.Add 1 .Columns.Add 2 .Columns.Add 3 .Columns.Add 4 .Columns.Add 5 .Columns.Add 6 End With
352. Does you control support RTL languages or if there is a property RightToLeft
With ComboBox1 .RightToLeft = True .ItemsAllowSizing = exResizeItem .DrawGridLines = exHLines .LinesAtRoot = exLinesAtRoot .ScrollBySingleLine = True .DefaultItemHeight = 64 With .Columns.Add("Column") .Alignment = RightAlignment .HeaderAlignment = RightAlignment .EditAlignment = RightAlignment End With With .Items .AddItem "Item 1" .ItemHeight(.InsertItem(.AddItem("Parent"),0,"Item 2")) = 48 .AddItem "Item 3" .ExpandItem(.ItemByIndex(1)) = True End With End With
351. How do I enable resizing all the items at runtime
With ComboBox1 .ItemsAllowSizing = exResizeAllItems .DrawGridLines = exHLines .Columns.Add "Column" .Items.AddItem "Item 1" With .Items .ItemHeight(.AddItem("Item 2")) = 48 End With .Items.AddItem "Item 3" End With
350. How can I remove the filter
With ComboBox1 With .Columns.Add("Column") .DisplayFilterButton = True .FilterType = exBlanks End With .ApplyFilter .ClearFilter End With
349. How do I display the icons being selected in the control's label
With ComboBox1 .Images "gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0" & _ "/oFBoVDolFo1HpFJpVLplNp1PqFRqVTqlVq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1" & _ "/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m0ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qO" & _ "x3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/y" & _ "NAOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA=" .Columns.Add "Column" With .Items .CellImage(.AddItem("Image 1"),0) = 1 .CellImage(.AddItem("Image 2"),0) = 2 .CellImage(.AddItem("Image 3"),0) = 3 End With .AssignEditImageOnSelect(0) = True .Value = "Image 2" End With
348. How do I select a value
With ComboBox1 .IntegralHeight = True .LinesAtRoot = exGroupLinesAtRoot .TreeColumnIndex = 1 .Columns.Add "Column 1" .Columns.Add "Column 2" With .Items h = .AddItem("Root 1.1") .CellCaption(h,1) = "Root 1.2" .CellCaption(.InsertItem(h,0,"Child 1.1"),1) = "Child 1.2" .CellCaption(.InsertItem(h,0,"Child 2.1"),1) = "Child 2.2" .ExpandItem(h) = True h = .AddItem("Root 2.1") .CellCaption(h,1) = "Root 2.2" .CellCaption(.InsertItem(h,0,"Child 1.1"),1) = "Child 1.2" End With .Value = "Root 1.1" End With
347. How do I select a value
With ComboBox1 .IntegralHeight = True .LinesAtRoot = exGroupLinesAtRoot .TreeColumnIndex = 1 .Columns.Add "Column 1" .Columns.Add "Column 2" With .Items h = .AddItem("Root 1.1") .CellCaption(h,1) = "Root 1.2" .CellCaption(.InsertItem(h,0,"Child 1.1"),1) = "Child 1.2" .CellCaption(.InsertItem(h,0,"Child 2.1"),1) = "Child 2.2" .ExpandItem(h) = True h = .AddItem("Root 2.1") .CellCaption(h,1) = "Root 2.2" .CellCaption(.InsertItem(h,0,"Child 1.1"),1) = "Child 1.2" End With .Select(1) = "Root 1.2" End With
346. How do change the visual appearance for the drop down border, using EBN
With ComboBox1 .VisualAppearance.Add 1,"c:\exontrol\images\normal.ebn" .DropDownBorder = &H1000000 End With
345. How do I remove the drop down's border
With ComboBox1
.DropDownBorder = None2
End With
344. How can I change the foreground color for edit controls
With ComboBox1 .ForeColorEdit = RGB(255,0,0) .IntegralHeight = True .LinesAtRoot = exGroupLinesAtRoot .TreeColumnIndex = 1 .Columns.Add "Column 1" .Columns.Add "Column 2" With .Items h = .AddItem("Root 1.1") .CellCaption(h,1) = "Root 1.2" .CellCaption(.InsertItem(h,0,"Child 1.1"),1) = "Child 1.2" .CellCaption(.InsertItem(h,0,"Child 2.1"),1) = "Child 2.2" .ExpandItem(h) = True h = .AddItem("Root 2.1") .CellCaption(h,1) = "Root 2.2" .CellCaption(.InsertItem(h,0,"Child 1.1"),1) = "Child 1.2" End With .Select(0) = "Root 1.1" End With
343. How can I change the background color for edit controls
With ComboBox1 .BackColorEdit = RGB(255,0,0) .IntegralHeight = True .LinesAtRoot = exGroupLinesAtRoot .TreeColumnIndex = 1 .Columns.Add "Column 1" .Columns.Add "Column 2" With .Items h = .AddItem("Root 1.1") .CellCaption(h,1) = "Root 1.2" .CellCaption(.InsertItem(h,0,"Child 1.1"),1) = "Child 1.2" .CellCaption(.InsertItem(h,0,"Child 2.1"),1) = "Child 2.2" .ExpandItem(h) = True h = .AddItem("Root 2.1") .CellCaption(h,1) = "Root 2.2" .CellCaption(.InsertItem(h,0,"Child 1.1"),1) = "Child 1.2" End With .Select(0) = "Root 1.1" End With
342. How can I hide the drop down buttons when the control loses the focus
With ComboBox1 .HideDropDownButton = True .IntegralHeight = True .LinesAtRoot = exGroupLinesAtRoot .TreeColumnIndex = 1 .Columns.Add "Column 1" .Columns.Add "Column 2" With .Items h = .AddItem("Root 1.1") .CellCaption(h,1) = "Root 1.2" .CellCaption(.InsertItem(h,0,"Child 1.1"),1) = "Child 1.2" .CellCaption(.InsertItem(h,0,"Child 2.1"),1) = "Child 2.2" .ExpandItem(h) = True h = .AddItem("Root 2.1") .CellCaption(h,1) = "Root 2.2" .CellCaption(.InsertItem(h,0,"Child 1.1"),1) = "Child 1.2" End With End With
341. How can I ensure that the drop down portions doesn't show partial items
With ComboBox1 .IntegralHeight = True .LinesAtRoot = exGroupLinesAtRoot .TreeColumnIndex = 1 .Columns.Add "Column 1" .Columns.Add "Column 2" With .Items h = .AddItem("Root 1.1") .CellCaption(h,1) = "Root 1.2" .CellCaption(.InsertItem(h,0,"Child 1.1"),1) = "Child 1.2" .CellCaption(.InsertItem(h,0,"Child 2.1"),1) = "Child 2.2" .ExpandItem(h) = True h = .AddItem("Root 2.1") .CellCaption(h,1) = "Root 2.2" .CellCaption(.InsertItem(h,0,"Child 1.1"),1) = "Child 1.2" End With End With
340. How can I close the drop down window when user double clicks it
With ComboBox1 .CloseOnDblClk = True .LinesAtRoot = exGroupLinesAtRoot .TreeColumnIndex = 1 .Columns.Add "Column 1" .Columns.Add "Column 2" With .Items h = .AddItem("Root 1.1") .CellCaption(h,1) = "Root 1.2" .CellCaption(.InsertItem(h,0,"Child 1.1"),1) = "Child 1.2" .CellCaption(.InsertItem(h,0,"Child 2.1"),1) = "Child 2.2" .ExpandItem(h) = True h = .AddItem("Root 2.1") .CellCaption(h,1) = "Root 2.2" .CellCaption(.InsertItem(h,0,"Child 1.1"),1) = "Child 1.2" End With End With
339. How do I get the handle of the drop down window
With ComboBox1 .Columns.Add 0 End With
338. How do I specify the height of the control's label
With ComboBox1 .LabelHeight = 34 .Columns.Add "Column" With .Items .AddItem "Item 3" .AddItem "Item 1" .AddItem "Item 2" End With End With
337. The control selects the portion of text that doesn't match with the selected item. How can I avoid that
With ComboBox1 .AutoSelect = False .Columns.Add "Column" With .Items .AddItem "Item 3" .AddItem "Item 1" .AddItem "Item 2" End With End With
336. How can I show the drop down window as soon as user starts typing in the control
With ComboBox1 .AutoDropDown = True .Columns.Add "Column" With .Items .AddItem "Item 3" .AddItem "Item 1" .AddItem "Item 2" End With End With
335. How do I change the text in the edit or label area
With ComboBox1 .Columns.Add "Column" With .Items .AddItem "Item 3" .AddItem "Item 1" .AddItem "Item 2" End With .EditText(0) = "Test" End With
334. How do I lock or make read-only the control
With ComboBox1 .Locked = True .Columns.Add "Column" With .Items .AddItem "Item 3" .AddItem "Item 1" .AddItem "Item 2" End With End With
333. How do I let user to resize only the height of the drop down window, at runtime
With ComboBox1 .AllowSizeGrip = True .AllowHResize = False .MinWidthList = 100 .MinHeightList = 100 .Columns.Add "Column" With .Items .AddItem "Item 3" .AddItem "Item 1" .AddItem "Item 2" End With End With
332. How do I let user to resize only the width of the drop down window, at runtime
With ComboBox1 .AllowSizeGrip = True .AllowVResize = False .Columns.Add "Column" With .Items .AddItem "Item 3" .AddItem "Item 1" .AddItem "Item 2" End With End With
331. How do I let user to resize the drop down window, at runtime
With ComboBox1 .AllowSizeGrip = True .Columns.Add "Column" With .Items .AddItem "Item 3" .AddItem "Item 1" .AddItem "Item 2" End With End With
330. How do I specify the height of the drop down window
With ComboBox1 .HeightList() = 400 .MinWidthList = 100 .AllowSizeGrip = True .Columns.Add "Column" With .Items .AddItem "Item 3" .AddItem "Item 1" .AddItem "Item 2" End With End With
329. How do I specify the minimum height of the drop down window
With ComboBox1 .MinHeightList = 100 .AllowSizeGrip = True .Columns.Add "Column" With .Items .AddItem "Item 3" .AddItem "Item 1" .AddItem "Item 2" End With End With
328. How do I specify the width of the drop down window
With ComboBox1 .WidthList() = 100 .AllowSizeGrip = True .Columns.Add "Column" With .Items .AddItem "Item 3" .AddItem "Item 1" .AddItem "Item 2" End With End With
327. How do I specify the minimum width of the drop down window
With ComboBox1 .MinWidthList = 100 .AllowSizeGrip = True .Columns.Add "Column" With .Items .AddItem "Item 3" .AddItem "Item 1" .AddItem "Item 2" End With End With
326. I have multiple columns, how can I display a single edit in the control's label
With ComboBox1 .SingleEdit = True .Columns.Add "Column 1" .Columns.Add "Column 2" With .Items .CellCaption(.AddItem("Item 1"),1) = "SubItem 1" .CellCaption(.AddItem("Item 2"),1) = "SubItem 2" .CellCaption(.AddItem("Item 3"),1) = "SubItem 3" End With End With
325. How do I turn off the auto complete feature
With ComboBox1 .AutoComplete = False .Columns.Add "Column" With .Items .AddItem "Item 3" .AddItem "Item 1" .AddItem "Item 2" End With End With
324. The control supports three styles: Simple, DropDown and DropDownList. How can I change the style
With ComboBox1
.Style = DropDownList
End With
323. Is there any option to align the header to the left and the data to the right
With ComboBox1 .Columns.Add("Left").Alignment = LeftAlignment With .Columns.Add("Right") .Alignment = RightAlignment .HeaderAlignment = RightAlignment .EditAlignment = RightAlignment End With With .Items .CellCaption(.AddItem("left"),1) = "right" End With End With
322. How do I change the control's border, using your EBN files
With ComboBox1 .VisualAppearance.Add 1,"c:\exontrol\images\normal.ebn" .Appearance = &H1000000 End With
321. Can I change the default border of the tooltip, using your EBN files
With ComboBox1 .ToolTipDelay = 1 .ToolTipWidth = 364 .VisualAppearance.Add 1,"c:\exontrol\images\normal.ebn" .Background(exToolTipAppearance) = &H1000000 .Columns.Add("tootip").ToolTip = "this is a tooltip assigned to a column" End With
320. Can I change the background color for the tooltip
With ComboBox1 .ToolTipDelay = 1 .ToolTipWidth = 364 .Background(exToolTipBackColor) = RGB(255,0,0) .Columns.Add("tootip").ToolTip = "this is a tooltip assigned to a column" End With
319. Does the tooltip support HTML format
With ComboBox1 .ToolTipDelay = 1 .ToolTipWidth = 364 .Columns.Add("tootip").ToolTip = "<font Tahoma;11>T</font>his is an HTML <b>tooltip</b> assigned to a <fgcolor=FF0000>column</fgc" & _ "olor>" End With
318. Can I change the forecolor for the tooltip
With ComboBox1 .ToolTipDelay = 1 .ToolTipWidth = 364 .Background(exToolTipForeColor) = RGB(255,0,0) .Columns.Add("tootip").ToolTip = "this is a tooltip assigned to a column" End With
317. Can I change the foreground color for the tooltip
With ComboBox1 .ToolTipDelay = 1 .ToolTipWidth = 364 .Columns.Add("tootip").ToolTip = "<fgcolor=FF0000>this is a tooltip assigned to a column</fgcolor>" End With
316. How can I merge cells
With ComboBox1 .DrawGridLines = exAllLines .MarkSearchColumn = False .Columns.Add "C1" .Columns.Add "C2" .Columns.Add "C3" With .Items h = .AddItem("this cell merges the first two columns") .CellMerge(h,0) = 1 h = .AddItem() .CellCaption(h,1) = "this cell merges the last two columns" .CellMerge(h,1) = 2 h = .AddItem("this cell merges the all three columns") .CellMerge(h,0) = 1 .CellMerge(h,0) = 2 h = .AddItem("this draws a divider item") .ItemDivider(h) = 0 End With End With
315. How can I merge cells
With ComboBox1 .MarkSearchColumn = False .TreeColumnIndex = -1 .Columns.Add "C1" .Columns.Add "C2" With .Items h = .AddItem("Cell 1") .CellCaption(h,1) = "This is bit of text that's shown on multiple lines. This is bit of text that's shown on multipl" & _ "e lines." .CellSingleLine(h,1) = False h = .AddItem("This is bit of text merges all cells in the item") .ItemDivider(h) = 0 .CellHAlignment(h,0) = CenterAlignment End With End With
314. How can I change the color for separator / dividers items
With ComboBox1 .MarkSearchColumn = False .TreeColumnIndex = -1 .ScrollBySingleLine = False .Columns.Add "C1" .Columns.Add "C2" With .Items h = .AddItem("Cell 1") .CellCaption(h,1) = "This is bit of text that's shown on multiple lines. This is bit of text that's shown on multipl" & _ "e lines." .CellSingleLine(h,1) = False h = .AddItem() .ItemDivider(h) = 0 .ItemDividerLine(h) = DoubleDotLine .ItemDividerLineAlignment(h) = DividerCenter .ItemHeight(h) = 6 .SelectableItem(h) = False h = .AddItem("Cell 2") .CellCaption(h,1) = "This is bit of text that's shown on multiple lines. This is bit of text that's shown on multipl" & _ "e lines." .CellSingleLine(h,1) = False End With End With
313. How can I add separator - dividers items
With ComboBox1 .MarkSearchColumn = False .TreeColumnIndex = -1 .ScrollBySingleLine = False .Columns.Add "C1" .Columns.Add "C2" With .Items h = .AddItem("Cell 1") .CellCaption(h,1) = "This is bit of text that's shown on multiple lines. This is bit of text that's shown on multipl" & _ "e lines." .CellSingleLine(h,1) = False h = .AddItem() .ItemDivider(h) = 0 .ItemDividerLine(h) = DoubleDotLine .ItemDividerLineAlignment(h) = DividerCenter .ItemHeight(h) = 6 .SelectableItem(h) = False h = .AddItem("Cell 2") .CellCaption(h,1) = "This is bit of text that's shown on multiple lines. This is bit of text that's shown on multipl" & _ "e lines." .CellSingleLine(h,1) = False End With End With
312. Can I change the style of the line being displayed by a divider item
With ComboBox1 .MarkSearchColumn = False .TreeColumnIndex = -1 .ScrollBySingleLine = False .Columns.Add "C1" .Columns.Add "C2" With .Items h = .AddItem("Cell 1") .CellCaption(h,1) = "This is bit of text that's shown on multiple lines. This is bit of text that's shown on multipl" & _ "e lines." .CellSingleLine(h,1) = False h = .AddItem("This is bit of text that's displayed on the entire item, divider.") .ItemDivider(h) = 0 .ItemDividerLine(h) = DoubleDotLine .CellHAlignment(h,0) = CenterAlignment .ItemHeight(h) = 24 End With End With
311. Can I remove the line being displayed by a divider item
With ComboBox1 .MarkSearchColumn = False .TreeColumnIndex = -1 .Columns.Add "C1" .Columns.Add "C2" With .Items h = .AddItem("Cell 1") .CellCaption(h,1) = "This is bit of text that's shown on multiple lines. This is bit of text that's shown on multipl" & _ "e lines." .CellSingleLine(h,1) = False h = .AddItem("This is bit of text that's displayed on the entire item, divider.") .ItemDivider(h) = 0 .ItemDividerLine(h) = EmptyLine .CellHAlignment(h,0) = CenterAlignment End With End With
310. How can I display a divider item, merging all cells
With ComboBox1 .MarkSearchColumn = False .TreeColumnIndex = -1 .Columns.Add "C1" .Columns.Add "C2" With .Items h = .AddItem("Cell 1") .CellCaption(h,1) = "This is bit of text that's shown on multiple lines. This is bit of text that's shown on multipl" & _ "e lines." .CellSingleLine(h,1) = False h = .AddItem("This is bit of text that's displayed on the entire item, divider.") .ItemDivider(h) = 0 .CellHAlignment(h,0) = CenterAlignment End With End With
309. How can I fix or lock items
With ComboBox1 .Columns.Add "Default" With .Items .LockedItemCount(exTop) = 1 .CellCaption(.LockedItem(exTop,0),0) = "This is a locked item, fixed to the top side of the control." .ItemBackColor(.LockedItem(exTop,0)) = RGB(196,196,186) .LockedItemCount(exBottom) = 2 .CellCaption(.LockedItem(exBottom,0),0) = "This is a locked item, fixed to the top side of the control." .ItemBackColor(.LockedItem(exBottom,0)) = RGB(196,196,186) .CellCaption(.LockedItem(exBottom,1),0) = "This is a locked item, fixed to the top side of the control." .ItemBackColor(.LockedItem(exBottom,1)) = RGB(186,186,186) End With End With
308. How can I fix or lock an item on the bottom side of the control
With ComboBox1 .Columns.Add "Default" With .Items .LockedItemCount(exBottom) = 1 .CellCaption(.LockedItem(exBottom,0),0) = "This is a locked item, fixed to the bottom side of the control." h = .AddItem("Root 1") .InsertItem h,0,"Child 1" .InsertItem h,0,"Child 2" .ExpandItem(h) = True End With End With
307. How can I fix or lock an item on the top of the control
With ComboBox1 .Columns.Add "Default" With .Items .LockedItemCount(exTop) = 1 .CellCaption(.LockedItem(exTop,0),0) = "This is a locked item, fixed to the top side of the control." h = .AddItem("Root 1") .InsertItem h,0,"Child 1" .InsertItem h,0,"Child 2" .ExpandItem(h) = True End With End With
306. Is there any function to limit the height of the items when I display it using multiple lines
With ComboBox1 .ScrollBySingleLine = True .Columns.Add "C1" .Columns.Add "C2" With .Items h = .AddItem("Cell 1") .CellCaption(h,1) = "This is bit of text that's shown on multiple lines. This is bit of text that's shown on multipl" & _ "e lines." .CellSingleLine(h,1) = False .ItemMaxHeight(h) = 48 End With End With
305. Why I cannot center my cells in the column
With ComboBox1 .TreeColumnIndex = -1 .DrawGridLines = &Hfffffffc Or GridLinesEnum.exVLines .Columns.Add("Default").Alignment = CenterAlignment .Items.AddItem "item 1" .Items.AddItem "item 2" .Items.AddItem "item 3" End With
304. How can I align the cell to the left, center or to the right
With ComboBox1 .TreeColumnIndex = -1 .DrawGridLines = &Hfffffffc Or GridLinesEnum.exVLines .Columns.Add "Default" With .Items .CellHAlignment(.AddItem("left"),0) = LeftAlignment .CellHAlignment(.AddItem("center"),0) = CenterAlignment .CellHAlignment(.AddItem("right"),0) = RightAlignment End With End With
303. How do I apply HTML format to a cell
With ComboBox1 .TreeColumnIndex = -1 .Images "gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0" & _ "/oFBoVDolFo1HpFJpVLplNp1PqFRqVTqlVq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1" & _ "/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m0ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qO" & _ "x3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/y" & _ "NAOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA=" .HTMLPicture("p1") = "c:\exontrol\images\zipdisk.gif" .HTMLPicture("p2") = "c:\exontrol\images\auction.gif" .Columns.Add "Default" With .Items h = .AddItem("The following item shows some of the HTML format supported:") .CellHAlignment(h,0) = CenterAlignment h = .AddItem("<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> ") .CellCaptionFormat(h,0) = exHTML .CellSingleLine(h,0) = False End With End With
302. How can I change the font for a cell
With ComboBox1 .Columns.Add "Default" .Items.AddItem "std font" With .Items .CellCaptionFormat(.AddItem("this <font tahoma;12>is a bit of text with</font> a different font"),0) = exHTML End With End With
301. How can I change the font for a cell
With ComboBox1 .Columns.Add "Default" .Items.AddItem "default font" Set f = CreateObject("StdFont") With f .Name = "Tahoma" .Size = 12 End With With .Items .CellFont(.AddItem("new font"),0) = f End With End With
300. How can I change the font for entire item
With ComboBox1 .Columns.Add "Default" .Items.AddItem "default font" Set f = CreateObject("StdFont") With f .Name = "Tahoma" .Size = 12 End With With .Items .ItemFont(.AddItem("new font")) = f End With End With
299. How do I vertically align a cell
With ComboBox1 .DrawGridLines = &Hfffffffc Or GridLinesEnum.exVLines .Columns.Add("MultipleLine").Def(exCellSingleLine) = False .Columns.Add "VAlign" With .Items h = .AddItem("This is a bit of long text that should break the line") .CellCaption(h,1) = "top" .CellVAlignment(h,1) = exTop h = .AddItem("This is a bit of long text that should break the line") .CellCaption(h,1) = "middle" .CellVAlignment(h,1) = exMiddle h = .AddItem("This is a bit of long text that should break the line") .CellCaption(h,1) = "bottom" .CellVAlignment(h,1) = exBottom End With End With
298. How can I change the position of an item
With ComboBox1 .Columns.Add "Default" With .Items .AddItem "Item 1" .AddItem "Item 2" .ItemPosition(.AddItem("Item 3")) = 0 End With End With
297. How do I find an item based on a path
With ComboBox1 .Columns.Add "Default" With .Items h = .AddItem("Root 1") .InsertItem h,0,"Child 1" .ItemData(.InsertItem(h,0,"Child 2")) = 1234 .ExpandItem(h) = True .ItemBold(.FindPath("Root 1\Child 1")) = True End With End With
296. How do I find an item
With ComboBox1 .Columns.Add "Default" With .Items h = .AddItem("Root 1") .InsertItem h,0,"Child 1" .InsertItem h,0,"Child 2" .ExpandItem(h) = True .ItemBold(.FindItem("Child 2",0)) = True End With End With
295. How can I insert a hyperlink or an anchor element
With ComboBox1 .Columns.Add "Column" With .Items .CellCaptionFormat(.AddItem("Just an <a1>anchor</a> element ..."),0) = exHTML End With With .Items .CellCaptionFormat(.AddItem("Just another <a2>anchor</a> element ..."),0) = exHTML End With End With
294. How do I find the index of the item based on its handle
With ComboBox1 .Columns.Add "Default" With .Items h = .AddItem("Root 1") .InsertItem h,0,"Child 1" .InsertItem h,0,"Child 2" .ExpandItem(h) = True .ItemBold(.ItemByIndex(.ItemToIndex(h))) = True End With End With
293. How do I find the handle of the item based on its index
With ComboBox1 .Columns.Add "Default" With .Items h = .AddItem("Root 1") .InsertItem h,0,"Child 1" .InsertItem h,0,"Child 2" .ExpandItem(h) = True .ItemBold(.ItemByIndex(1)) = True End With End With
292. How can I find the cell being clicked in a radio group
With ComboBox1 .MarkSearchColumn = False .SelBackColor = RGB(255,255,128) .SelForeColor = RGB(0,0,0) .Columns.Add "C1" .Columns.Add "C2" .Columns.Add "C3" With .Items h = .AddItem("Cell 1") .CellCaption(h,1) = "Radio 1" .CellHasRadioButton(h,1) = True .CellRadioGroup(h,1) = 1234 .CellCaption(h,2) = "Radio 2" .CellHasRadioButton(h,2) = True .CellRadioGroup(h,2) = 1234 .CellState(h,1) = 1 .CellBold(0,.CellChecked(1234)) = True End With End With
291. Can I add a +/- ( expand / collapse ) buttons to each item, so I can load the child items later
With ComboBox1 .LinesAtRoot = exLinesAtRoot .Columns.Add "Default" With .Items .ItemHasChildren(.AddItem("parent item with no child items")) = True .AddItem "next item" End With End With
290. Can I let the user to resize at runtime the specified item
With ComboBox1 .ScrollBySingleLine = True .DrawGridLines = &Hfffffffc Or GridLinesEnum.exVLines .Columns.Add "Default" With .Items .ItemAllowSizing(.AddItem("resizable item")) = True .AddItem "not resizable item" End With End With
289. How can I change the size ( width, height ) of the picture
With ComboBox1 .Columns.Add "Default" With .Items h = .AddItem("Root 1") .CellPicture(h,0) = ComboBox1.ExecuteTemplate("loadpicture(`c:\exontrol\images\zipdisk.gif`)") .CellPictureWidth(h,0) = 24 .CellPictureHeight(h,0) = 24 .ItemHeight(h) = 32 h = .AddItem("Root 2") .CellPicture(h,0) = ComboBox1.ExecuteTemplate("loadpicture(`c:\exontrol\images\zipdisk.gif`)") .ItemHeight(h) = 48 End With End With
288. How do I unselect an item
With ComboBox1 .Columns.Add "Default" With .Items h = .AddItem("Root 1") .InsertItem h,0,"Child 1" .InsertItem h,0,"Child 2" .ExpandItem(h) = True .SelectItem(h) = False End With End With
287. How do I find the selected item
With ComboBox1 .Columns.Add "Default" With .Items h = .AddItem("Root 1") .InsertItem h,0,"Child 1" .InsertItem h,0,"Child 2" .ExpandItem(h) = True .SelectItem(h) = True .ItemBold(.SelectedItem(0)) = True End With End With
286. How do I select an item
With ComboBox1 .Columns.Add "Default" With .Items h = .AddItem("Root 1") .InsertItem h,0,"Child 1" .InsertItem h,0,"Child 2" .ExpandItem(h) = True .SelectItem(h) = True End With End With
285. Can I display a button with some picture or icon inside
With ComboBox1 .HTMLPicture("p1") = "c:\exontrol\images\zipdisk.gif" .Columns.Add "C1" .Columns.