Home

Awesome

Class Rebar

Class for AutoHotkey Rebar custom controls

AHK version: 1.1.23.01

This class provides intuitive methods to work with Rebar controls created via Gui, Add, Custom, ClassReBarWindow32.

Rebar Methods

Useful Rebar Styles

Styles can be applied to Gui command options, e.g.: Gui, Add, Custom, ClassReBarWindow32 0x0800 0x0100


Delete()

Deletes a band from a rebar control.

Return

TRUE if successful, FALSE if there was a problem.

Parameters

GetBand()

Retrieves information from a rebar band.

Return

TRUE if successful, FALSE if there was a problem.

Parameters

GetBandCount()

Retrieves the count of bands currently in the rebar control.

Return

The number of bands in the rebar control.

GetBarHeight()

Retrieves the height of the rebar control.

Return

The height of the rebar control in pixels.

GetLayout()

Retrieves the current layout of bands in the rebar control.

Return

A string containing information about the current bands. String format is: ID1,Size1,Style1|ID2,Size2,Style2|...

GetRowCount()

Retrieves the number of rows of bands in a rebar control.

Return

The number of rows in the rebar control.

GetRowHeight()

Retrieves the number of rows of bands in a rebar control.

Return

The height of the row from the corresponding band in pixels.

Parameters

IDToIndex()

Converts a band identifier to a band index in a rebar control.

Return

The 1-based band index if successful, or 0 otherwise.

Parameters

InsertBand()

Inserts a new band in a rebar control.

Return

TRUE if successful, FALSE if there was a problem.

Parameters

MaximizeBand()

Resizes a band to either its ideal or largest size.

Return

TRUE if successful, FALSE if there was a problem.

Parameters

MinimizeBand()

Resizes a band to its smallest size.

Return

TRUE if successful, FALSE if there was a problem.

Parameters

ModifyBand()

Sets band parameters such as Text and Size.

Return

TRUE if successful, FALSE if there was a problem.

Parameters

MoveBand()

Moves a band from one index to another.

Return

TRUE if successful, FALSE if there was a problem.

Parameters

OnNotify()

Handles rebar notifications. This method should be called from the rebar's G-Label. If A_GuiEvent is "N", pass it A_EventInfo as the Param. You can also call it from a function monitoring the WM_NOTIFY message, pass it lParam as the Param. Currently this method is used to retrieve the position for a menu when the Chevron button is pushed and prevent a number of rows higher then the one set by SetMaxRows method.

Return

If the ChevronPushed notification is passed returns the index of the band it is from.

Parameters

SetBandStyle()

Sets the style of a band.

Return

TRUE if successful, FALSE if there was a problem.

Parameters

SetBandWidth()

Sets the width for a docked band.

Return

TRUE if successful, FALSE if there was a problem.

Parameters

SetImageList()

Sets an ImageList to the rebar control.

Return

TRUE if successful, FALSE if there was a problem.

Parameters

SetLayout()

Sets a layout of bands in the rebar control.

Return

TRUE if a valid layout was passed, or FALSE otherwise.

Parameters

SetMaxRows()

Sets the maximum number of rows allowed in a rebar control. This method requires the OnNotify method to be implemented.

Return

The number of rows previously allowed.

Parameters

ShowBand()

Shows or hides a given band in a rebar control.

Return

TRUE if successful, FALSE if there was a problem.

Parameters

ToggleStyle()

Toggles rebar's style.

Return

TRUE if a valid style is passed, or FALSE otherwise.

Parameters