Skip to content

Latest commit

 

History

History
42 lines (34 loc) · 2.07 KB

statusbar_small.md

File metadata and controls

42 lines (34 loc) · 2.07 KB

About

I have created a minimal status bar function here. It consists of a collection of labels. This also makes it possible to evaluate clicks on the parts.
Font and style can be set for the entire status bar. The height of the resulting control is determined from this when it is created.
The existing UDF is a bit too cluttered for me on the one hand and too uncomfortable on the other.
Although I have modelled myself somewhat on the existing status bar UDF, there are some striking differences:

  • The status bar is at the bottom by default, but can also be positioned at the top.
  • The width of the parts is indicated (not the right position).
  • The width must be specified for all parts.
  • The width can be set to "-1". For this part(s), the remaining space is divided equally with other parts set to "-1".
  • (Rounding) differences arising during width determination are applied to the last part marked with "-1" for correction, alternatively to the last part.
  • There is an additional parameter when creating and a separate function for aligning the parts.
  • All parameters (part width, part index, texts, alignment) can optionally be passed as a separated string (Opt("GuiDataSeparatorChar")) or array.
  • The text and/or background colour of individual/several/all parts can be set by function.

Current

v 0.3

Functions

_StatusbarCreate Creates a simple status bar, position default on bottom border, can also be on top border
_StatusbarSetText Sets values for one / more parts based on the 0-based index
_StatusbarSetAlign Sets the alignment of one or more parts
_StatusbarSetColors Sets text and / or background color for one / several parts
_StatusbarSetOnEvent Sets OnEvent function for parts by passed indexes (default: all)

Gallery

bottom

top

alignment

colored