Hide

SftTree/NET 2.0 - Tree Control for Windows Forms

Display
Print

Appearance Property, ProgressBarPartClass Class

Defines the progressbar appearance.

Class: ProgressBarPartClass
Namespace: Softelvdm.Controls
Assembly: Softelvdm.SftTreeNET

Syntax

public GadgetAppearanceEnum Appearance { get; set; }
Public Property Appearance As GadgetAppearanceEnum

Value

The appearance.

The default value is GadgetAppearanceEnum.Default.

Comments

Defines the progressbar appearance.

If the Appearance property is set to GadgetAppearanceEnum.Default, the appearance as defined by the GadgetsClass.ProgressBarAppearanceDefault property is used.

If the appearance uses Windows themes, the ProgressBarPartClass.ProgressColor and ProgressBarPartClass.ProgressColorEnd properties are not used.

Examples

C#

            // Add another item
            item = sftTree1.ItemCollection.Add();

            // Add a progressbar to the first cell
            ProgressBarPartClass pbp = new ProgressBarPartClass(0, 50, 25, 100, 12, GadgetAppearanceEnum.ThemedSystem,
                            Color.Red, Color.White, System.Drawing.Drawing2D.LinearGradientMode.Vertical);
            pbp.PartAlignment = PartAlignmentEnum.EntireArea;
            pbp.Appearance = GadgetAppearanceEnum.System;
            item.Cells[0].Parts.Add(pbp);

            // Add a button to the second cell
            ButtonPartClass bp = new ButtonPartClass(false, HAlignmentOptionalEnum.Default, VAlignmentOptionalEnum.Default,
                        true, false, GadgetAppearanceEnum.ThemedSystem, null, "Click Me", null, Color.Red);
            bp.Action += new GenericPartClass.ActionEventHandler(bp_Action);
            item.Cells[1].Parts.Add(bp);

VB.NET

    ' Add another item
    item = sftTree1.ItemCollection.Add()

    ' Add a progressbar to the first cell
    Dim pbp As ProgressBarPartClass = New ProgressBarPartClass(0, 50, 25, 100, 12, GadgetAppearanceEnum.ThemedSystem, _
                Color.Red, Color.White, System.Drawing.Drawing2D.LinearGradientMode.Vertical)
    pbp.PartAlignment = PartAlignmentEnum.EntireArea
    pbp.Appearance = GadgetAppearanceEnum.System
    item.Cells(0).Parts.Add(pbp)

    ' Add a button to the second cell
    Dim bp As ButtonPartClass = New ButtonPartClass(False, HAlignmentOptionalEnum.Default, VAlignmentOptionalEnum.Default, _
            True, False, GadgetAppearanceEnum.ThemedSystem, Nothing, "Click Me", Nothing, Color.Red)
    AddHandler bp.Action, AddressOf bp_Action
    item.Cells(1).Parts.Add(bp)

See Also ProgressBarPartClass Class | Classes | SftTree/NET 2.0



Spring Break!

Our offices will be closed this week (March 18 through March 22).

We'll be back March 24 to address any pending sales and support issues.