Skybound Rebar

RebarBand Class

Represents a single band on a rebar control.

For a list of all members of this type, see RebarBand Members.

System.Object
   System.MarshalByRefObject
      System.ComponentModel.Component
         Skybound.Rebar.RebarBand

[Visual Basic]
Public Class RebarBand
    Inherits Component
[C#]
public class RebarBand : Component

Thread Safety

Public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread-safe.

Remarks

RebarBand objects represent moveable, repositionable bands on a Rebar control. RebarBand objects contain one or more RebarButton objects that represent the buttons on the band. Buttons can be added to or removed from a band through the Buttons property.

There are two types of rebar bands: MenuBar and ToolBar. MenuBar bands can only contain menu buttons, whereas ToolBar buttons can contain buttons of any type. Furthermore, mnemonics for accelerator keys are only used on MenuBar bands.

Customize the behavior of the band by setting the HasChevron and HasSizeGrip properties. HasChevron specifies whether a chevron button will appear to display a menu to access buttons on the band that are hidden because the band is too small. HasSizeGrip specifies whether a band has a size grip that can be used to move and reposition bands at runtime.

RebarBand provides several properties that you can use to determine the position of the band in the rebar and in the row, such as IsFirst, IsFirstOnRow, IsLast and IsLastOnRow. These properties will return true if the band has not been added to the Bands collection of a rebar control.

You can also traverse the bands in the order in which they appear on the screen using the NextBand and PreviousBand methods. These methods return a null reference (Nothing in Visual Basic) if the band has not been added to the Bands collection of a rebar control.

Customize the way buttons are drawn on a rebar by setting the DrawMode property to OwnerDraw and handling the DrawButton event. If the width of each button needs to be customized, set the DrawMode property to OwnerDrawAndMeasure and handle both the DrawButton and MeasureButton events.

Requirements

Namespace: Skybound.Rebar

Assembly: Skybound.Rebar (in Skybound.Rebar.dll)

See Also

RebarBand Members | Skybound.Rebar Namespace