Skip to content

StatusBarControl


Members

gui

desc: The parent GUI of the StatusBar.

type: GridGUI.GUI

meta: [object]

Methods

__New

__New(guiHwnd, options := "", text := "")

Constructor.

parameters

name: guiHwnd

desc: The hwnd of the GUI that the StatusBar should be added to.

type: hwnd

name: options

desc: The options that the StatusBar will be created with. Does not accept vVars.

type: string

default: ""

link: link

name: text

desc: The text that the StatusBar will be created with.

type: string

default: ""

return value

__ResetDefaultGui

__ResetDefaultGui(previous)

Sets the default GUI. Used to restore the old default GUI, so that using the methods of the class won't have any side effects.

parameters

name: previous

desc: The hwnd that should be set as the default GUI

type: string|number|object

__SetDefaultGui

__SetDefaultGui()

Sets the default GUI to GridGUI.StatusBarControl.gui so that the SB_Functions work on the right StatusBar.

return value

desc: The hwnd of the previous default GUI

type: hwnd

SetIcon

SetIcon(Filename, IconNumber := 1, PartNumber := 1)

Displays a small icon to the left of the text in the specified part. See link for details.

parameters

name: Filename

desc: The path to an icon resource, can be any of the following formats ico, cur, ani, exe, dll, cpl and scr. See link for details.

type: string|Image-Handle

name: IconNumber

desc: The icon index in the file pointed to by Filename. See link for details.

type: number

default: 1

name: PartNumber

desc: The part of the StatusBar to put the icon in.

type: number

default: 1

return value

desc: The handle to the icon that was added or 0 on failure.

type: HICON

link: link

SetParts

SetParts(Widths*)

Divides the bar into multiple sections according to the specified widths (in pixels).

parameters

name: Widths

desc: The widths of the parts of the StatusBar except for the last part as it will fill the remaining width of the GUI. If no widths are provided then the StatusBar will have only one part that has the width of the GUI.

type: number

meta: [variadic]

return value

desc: The hwnd of the StatusBar or 0 upon failure.

type: hwnd

link: link

SetText

SetText(NewText, PartNumber := 1, Style := 0)

Sets the text in the specified part of the StatusBar.

parameters

name: NewText

desc: The text to change a part of the StatusBar to.

type: string

name: PartNumber

desc: The number of the part of the StatusBar to change the text of.

type: number

default: 1

name: Style

desc: Specify 0 for a traditional border that makes that part of the bar look sunken. Specify 1 to have no border or 2 to have border that makes that part of the bar look raised.

type: number

default: 0

return value

desc: Returns 1 upon success or 0 upon failure.

type: bool

link: link

Back to top