SftTree/DLL 7.5 - Tree Control
SftBox/OCX 5.0 - Combo Box Control
SftButton/OCX 3.0 - Button Control
SftMask/OCX 7.0 - Masked Edit Control
SftTabs/OCX 6.5 - Tab Control (VB6 only)
SftTree/OCX 7.5 - Tree Control
SftPrintPreview/DLL 2.0 - Print Preview Control (discontinued)
SftTree/DLL 7.5 - Tree Control
SftBox/OCX 5.0 - Combo Box Control
SftButton/OCX 3.0 - Button Control
SftDirectory 3.5 - File/Folder Control (discontinued)
SftMask/OCX 7.0 - Masked Edit Control
SftOptions 1.0 - Registry/INI Control (discontinued)
SftPrintPreview/OCX 1.0 - Print Preview Control (discontinued)
SftTabs/OCX 6.5 - Tab Control (VB6 only)
SftTree/OCX 7.5 - Tree Control
SftTabs/NET 6.0 - Tab Control (discontinued)
SftTree/NET 2.0 - Tree Control
Defines the cell's foreground color.
Get
Put
object
A SftTreeCell object.
Clr
Defines the cell's foreground color. -1 indicates that there is no defined color and the default color defined using Column.ForeColor is used. For information about color properties, please visit the applicable section "Using SftTree/OCX with ...".
The ForeColor property defines the cell's foreground color.
The cell has the foreground color attribute Clr. This color is used as text color when the item is not selected. If the item is selected and uses a suitable selection style (Items.SelectStyle), the Cell.SelectForeColor property is used instead.
e.itemObject.Item.Cell(4).Text = "Last " & e.rowIndex e.itemObject.Item.RowHeader.Text = "R" & e.rowIndex e.itemObject.Item.Enabled = ((e.rowIndex Mod 2) = 0) If e.rowIndex Mod 17 = 0 Then e.itemObject.Item.RowHeader.Image.NETImageObject = imageListBitmaps.Images(e.rowIndex Mod 10) End If If e.rowIndex Mod 3 = 0 Then e.itemObject.Item.Cell(1).ForeColor = OLECvt.ToOleColor(System.Drawing.Color.Red) e.itemObject.Item.Cell(1).BackColor = OLECvt.ToOleColor(System.Drawing.Color.Aqua) End If If e.rowIndex Mod 5 = 0 Then e.itemObject.Item.Cell(1).Font.Bold = True End If If e.rowIndex Mod 7 = 0 Then e.itemObject.Item.Image.NETImageObject = imageListBitmaps.Images((e.rowIndex + 9) Mod 10)
ItemObject.Item.Cell(4).Text = "Last " & RowIndex ItemObject.Item.RowHeader.Text = "R" & RowIndex ItemObject.Item.Enabled = ((RowIndex Mod 2) = 0) If RowIndex Mod 17 = 0 Then ItemObject.Item.RowHeader.Image.Picture = Image1(RowIndex Mod 10).Picture End If If RowIndex Mod 3 = 0 Then ItemObject.Item.Cell(1).ForeColor = vbRed ItemObject.Item.Cell(1).BackColor = vbWhite End If If RowIndex Mod 5 = 0 Then ItemObject.Item.Cell(1).Font.Bold = True End If If RowIndex Mod 7 = 0 Then Set ItemObject.Item.Image.Picture = Image1((RowIndex + 9) Mod 10).Picture
e.itemObject.Item.get_Cell(3).Text = (e.rowIndex % 7).ToString(); e.itemObject.Item.get_Cell(4).Text = "Last " + e.rowIndex.ToString(); e.itemObject.Item.RowHeader.Text = "R" + e.rowIndex.ToString(); e.itemObject.Item.Enabled = ((e.rowIndex % 2) == 0); if (e.rowIndex % 17 == 0) e.itemObject.Item.RowHeader.Image.NETImageObject = imageListBitmaps.Images[e.rowIndex % 10]; if (e.rowIndex % 3 == 0) { e.itemObject.Item.get_Cell(1).ForeColor = OLECvt.ToOleColor(System.Drawing.Color.Red); e.itemObject.Item.get_Cell(1).BackColor = OLECvt.ToOleColor(System.Drawing.Color.Aqua); } if (e.rowIndex % 5 == 0) e.itemObject.Item.get_Cell(1).Font.Bold = true; if (e.rowIndex % 7 == 0) { e.itemObject.Item.Image.NETImageObject = imageListBitmaps.Images[(e.rowIndex + 9) % 10]; e.itemObject.Item.LabelImage.NETImageObject = imageListBitmaps.Images[(e.rowIndex + 1) % 10];
str.Format(_T("R%ld"), RowIndex); pItemObj->Item->RowHeader->Text = (LPCTSTR) str; pItemObj->Item->Enabled = ((RowIndex % 2) == 0) ? VARIANT_TRUE : VARIANT_FALSE; if (RowIndex % 17 == 0) pItemObj->Item->RowHeader->Image->SetImageListH((OLE_HANDLE)(HIMAGELIST)m_Bitmaps, (short)(RowIndex % 10)); if (RowIndex % 3 == 0) { pItemObj->Item->Cell[1]->ForeColor = RGB(255,0,0); pItemObj->Item->Cell[1]->BackColor = RGB(255,255,255); } if (RowIndex % 5 == 0) { IFontPtr pFont = pItemObj->Item->Cell[1]->Font(); pFont->put_Bold(TRUE); } if (RowIndex % 7 == 0) {
See Also SftTreeCell Object | Object Hierarchy