Hide

SftTree/NET 2.0 - Tree Control for Windows Forms

Display
Print

BackgroundAppearanceEnum Enumeration

Defines the background appearance.

Class: (none)
Namespace: Softelvdm.Controls
Assembly: Softelvdm.SftTreeNET

Syntax

public enum BackgroundAppearanceEnum;
Public Enum BackgroundAppearanceEnum

Values

NameDescription
CleanNo particular background rendering is applied. Foreground and background colors are used to render the available area.
ButtonPlainThe background is rendered with the same appearance as a plain button (a non-themed button image). Foreground and background colors are used to render the available area.
ButtonPlainNeverPressedThe background is rendered with the same appearance as a plain button (a non-themed button image). ButtonPlainNeverPressed behaves just line ButtonPlain, but does not reflect a pressed state. Foreground and background colors are used to render the available area.
ThemedSystemHeaderThe background is rendered with the same appearance as a header (using Windows themes if available). Foreground and background colors are used to render the available area. However, background colors are ignored when Windows themes are available.
ThemedSystemHeaderEmptyAreaThe background is rendered with the same appearance as a header above an empty area (using Windows themes if available). Foreground and background colors are used to render the available area. However, background colors are ignored when Windows themes are available.
ThemedSystemHeaderNeverPressedThe background is rendered with the same appearance as a header (using Windows themes if available). ThemedSystemHeaderNeverPressed behaves just line ThemedSystemHeader, but does not reflect a pressed state. Foreground and background colors are used to render the available area. However, background colors are ignored when Windows themes are available.
ThemedAppearanceHeaderThe background is rendered with the same appearance as a header (emulating an appearance that mimics Windows XP themes, even on operating systems that do not offer themes). Defined background colors are ignored.
ThemedAppearanceHeaderEmptyAreaThe background is rendered with the same appearance as a header above an empty area (emulating an appearance that mimics Windows XP themes, even on operating systems that do not offer themes). Defined background colors are ignored.
ThemedAppearanceHeaderNeverPressedThe background is rendered with the same appearance as a header (emulating an appearance that mimics Windows XP themes, even on operating systems that do not offer themes). ThemedAppearanceHeaderNeverPressed behaves just line ThemedAppearanceHeader, but does not reflect a pressed state. Defined background colors are ignored.
DefaultThe default value is determined by a containing object or by the environment. If no containing object or environmental information is available, BackgroundAppearanceEnum.Default is identical to BackgroundAppearanceEnum.Clean.

Comments

Defines the background appearance.

Based on the selected background appearance, the available space for content rendering may decrease.

Examples

C#

            sftTree1.Columns.MakeOptimal(0, false);
            sftTree1.RecalcHorizontalExtent();
            sftTree1.Initializing = false;
        }

        private ItemClass AddCategory(string Category) {
            ItemClass item = sftTree1.ItemCollection.Add();
            CellClass cell = item.Cells[0];
            cell.Appearance = BackgroundAppearanceEnum.ThemedSystemHeaderNeverPressed;
            cell.Parts.Add(new ImagePartClass(m_PlusImage));
            cell.Parts.Add(new TextPartClass(Category));
            item.TagString = "This is a tooltip explaining " + Category;
            return item;
        }
        private void AddItem(ItemClass cat, Image img, string ItemText) {
            ItemClass item = cat.Add();

VB.NET

    sftTree1.Columns.MakeOptimal(0, False)
    sftTree1.RecalcHorizontalExtent()
    sftTree1.Initializing = False
End Sub

Private Function AddCategory(ByVal Category As String) As ItemClass
    Dim item As ItemClass = sftTree1.ItemCollection.Add()
    Dim cell As CellClass = item.Cells(0)
    cell.Appearance = BackgroundAppearanceEnum.ThemedSystemHeaderNeverPressed
    cell.Parts.Add(New ImagePartClass(m_PlusImage))
    cell.Parts.Add(New TextPartClass(Category))
    item.TagString = "This is a tooltip explaining " & Category
    Return item
End Function

Private Sub AddItem(ByVal cat As ItemClass, ByVal img As Image, ByVal ItemText As String)

See Also | Classes | SftTree/NET 2.0