xtd - Reference Guide 0.2.0
xtd::forms::status_bar_panel Class Reference

#include <status_bar_panel.h>

Definition

Represents a xtd::forms::status_bar panel.

Namespace
xtd::forms
Library
xtd.forms
Examples
The following code example demonstrates the use of xtd::forms::status_bar_panel control.
#include <xtd/xtd>
using namespace xtd;
using namespace xtd::drawing;
using namespace xtd::forms;
namespace examples {
class form1 : public form {
public:
form1() {
text("Status bar example");
client_size({820, 500});
status_bar1.parent(*this);
status_bar1.panels().push_back_range({status_bar_panel1, status_bar_panel2, status_bar_panel3, status_bar_panel4});
status_bar1.show_panels(true);
status_bar_panel1.border_style(xtd::forms::status_bar_panel_border_style::sunken);
status_bar_panel1.tool_tip_text("Status one tool tip text");
status_bar_panel2.border_style(xtd::forms::status_bar_panel_border_style::sunken);
status_bar_panel3.auto_size(xtd::forms::status_bar_panel_auto_size::spring);
status_bar_panel3.border_style(xtd::forms::status_bar_panel_border_style::sunken);
status_bar_panel4.border_style(xtd::forms::status_bar_panel_border_style::sunken);
timer1.interval_milliseconds(50);
timer1.tick += [&] {
progress_bar1.value(progress_bar1.value() < progress_bar1.maximum() ? progress_bar1.value() + 1 : progress_bar1.minimum());
};
timer1.enabled(true);
}
private:
static image image_from_color(const color& color) {
bitmap bitmap(16, 16);
auto g = graphics::from_image(bitmap);
g.fill_ellipse(solid_brush(color), 0, 0, bitmap.width(), bitmap.height());
g.draw_ellipse(pens::black(), 0, 0, bitmap.width() - 1, bitmap.height() - 1);
return bitmap;
}
forms::status_bar status_bar1;
status_bar_panel status_bar_panel1 = status_bar_panel::create_panel("Status one", image_from_color(color::light_green));
status_bar_panel status_bar_panel2 = status_bar_panel::create_panel("Status two");
status_bar_panel status_bar_panel3 = status_bar_panel::create_panel("Status three");
timer timer1;
progress_bar progress_bar1;
status_bar_panel status_bar_panel4 = status_bar_panel::create_control(progress_bar1);
};
}
int main() {
application::run(examples::form1());
}
Remarks
A xtd::forms::status_bar_panel represents an individual panel in the xtd::forms::status_bar::status_bar_panel_collection of a xtd::forms::status_bar control. A xtd::forms::status_bar_panel can contain text and/or an image that can be used to reflect the status of an application. Use the xtd::forms::status_bar::status_bar_panel_collection, accessible through the xtd::forms::status_bar::panels property of a xtd::forms::status_bar control, to retrieve, add, or remove an individual xtd::forms::status_bar_panel.
The xtd::forms::status_bar_panel provides properties that enable you to modify the display behavior of a panel within a xtd::forms::status_bar control. You can use the xtd::forms::status_bar_panel::image property to display an image within a panel. This property can be used to provide a graphical representation of state in an application. The xtd::forms::status_bar_panel::alignment property enables you to specify how text and/or an image is aligned within the panel. To ensure that your panel is sized properly to fit the text of the panel, you can use the xtd::forms::status_bar_panel::auto_size property to automatically resize the panel to fit the text of the panel or to fill the remaining space within the xtd::forms::status_bar control. The xtd::forms::status_bar_panel::min_width property enables you to specify a minimum width for the panel to ensure that it does not get smaller than the data it is intended to display.
The xtd::forms::status_bar control is typically used to display Help information or state information about your application. Often, it is important to display additional information about data that is presented in a panel. You can use the xtd::forms::status_bar_panel::tool_tip_text property to display information whenever the mouse pointer rests on a panel.
Although the xtd::forms::status_bar control is typically used to display textual information, you can also provide your own type of display to a xtd::forms::status_bar_panel. The xtd::forms::status_bar_panel::style property enables you to specify how the xtd::forms::status_bar_panel will be drawn. By default, the xtd::forms::status_bar_panel::style property is used to display the value of the xtd::forms::status_bar_panel_style::text property (and an image, if specified in the xtd::forms::status_bar_panel::image property). If the property is set to xtd::forms::status_bar_panel_style::owner_draw, you can draw your own information into the panel. You can use this feature to draw a progress bar or an animated image in the panel.
When you create an instance of the xtd::forms::status_bar_panel class, the read/write properties are set to initial values. For a list of these values, see the xtd::forms::status_bar_panel::status_bar_panel constructor.

Constructors

 status_bar_panel ()=default
 Initialises a new instance of xtd::forms::status_bar_panel class. More...
 

Properties

xtd::forms::horizontal_alignment alignment () const noexcept
 Gets the alignment of text and icons within the status bar panel. More...
 
status_bar_panelalignment (xtd::forms::horizontal_alignment value)
 Sets the alignment of text and icons within the status bar panel. More...
 
xtd::forms::status_bar_panel_auto_size auto_size () const noexcept
 Gets a value indicating whether the status bar panel is automatically resized. More...
 
status_bar_panelauto_size (xtd::forms::status_bar_panel_auto_size value)
 Sets a value indicating whether the status bar panel is automatically resized. More...
 
xtd::forms::status_bar_panel_border_style border_style () const noexcept
 Gets the border style of the status bar panel. More...
 
status_bar_panelborder_style (xtd::forms::status_bar_panel_border_style value)
 Sets the border style of the status bar panel. More...
 
std::optional< std::reference_wrapper< xtd::forms::control > > control () const noexcept
 Gets the control to be displayed in the control status bar panel. More...
 
status_bar_panelcontrol (const xtd::forms::control &value)
 Sets the control to be displayed in the control status bar panel. More...
 
status_bar_panelcontrol (std::nullptr_t value)
 Resets the control to be displayed in the control status bar panel. More...
 
const xtd::drawing::imageimage () const noexcept
 Gets the image to display within the status bar panel. More...
 
status_bar_panelimage (const xtd::drawing::image &value)
 Sets the image to display within the status bar panel. More...
 
int32_t min_width () const noexcept
 Gets the minimum allowed width of the status bar panel within the xtd::forms::status_bar control. More...
 
status_bar_panelmin_width (int32_t value)
 Sets the minimum allowed width of the status bar panel within the xtd::forms::status_bar control. More...
 
const xtd::ustringname () const noexcept
 Gets the name of the xtd::forms::status_bar_panel. More...
 
status_bar_panelname (const xtd::ustring &value)
 Sets the name of the xtd::forms::status_bar_panel. More...
 
std::optional< std::reference_wrapper< xtd::forms::status_bar > > parent () const noexcept
 Gets the xtd::forms::status_bar control that the status bar panel is assigned to. More...
 
xtd::forms::status_bar_panel_style style () const noexcept
 Gets the style of the status bar panel. More...
 
status_bar_panelstyle (xtd::forms::status_bar_panel_style value)
 Sets the style of the status bar panel. More...
 
std::any tag () const noexcept
 Gets an object that contains data about the xtd::forms::status_bar_panel. More...
 
status_bar_paneltag (std::any value)
 Sets an object that contains data about the xtd::forms::status_bar_panel. More...
 
const xtd::ustringtext () const noexcept
 Gets the text of the status bar panel. More...
 
status_bar_paneltext (const xtd::ustring &value)
 Sets the text of the status bar panel. More...
 
const xtd::ustringtool_tip_text () const noexcept
 Gets ToolTip text associated with the status bar panel. More...
 
status_bar_paneltool_tip_text (const xtd::ustring &value)
 Sets ToolTip text associated with the status bar panel. More...
 
int32_t width () const noexcept
 Gets the width of the status bar panel within the xtd::forms::status_bar control. More...
 
status_bar_panelwidth (int32_t value)
 Sets the width of the status bar panel within the xtd::forms::status_bar control. More...
 

Methods

void begin_init ()
 Begins the initialization of a xtd::forms::status_bar_panel. More...
 
void end_init ()
 Ends the initialization of a xtd::forms::status_bar_panel. More...
 
xtd::ustring to_string () const noexcept override
 Returns a string that represents the xtd::forms::status_bar_panel control. More...
 
static status_bar_panel create_control (const xtd::ustring &text, const xtd::forms::control &control)
 A factory to create a control status bar panel with specified text and control. More...
 
static status_bar_panel create_control (const xtd::forms::control &control)
 A factory to create a control status bar panel with specified control. More...
 
static status_bar_panel create_panel (const xtd::ustring &text)
 A factory to create a status bar panel with specified text. More...
 
static status_bar_panel create_panel (const xtd::drawing::image &image)
 A factory to create a status bar panel with specified image index. More...
 
static status_bar_panel create_panel (const xtd::ustring &text, const xtd::drawing::image &image)
 A factory to create a status bar panel with specified text and image index. More...
 

Additional Inherited Members

- Public Member Functions inherited from xtd::object
 object ()=default
 Create a new instance of the ultimate base class object. More...
 
virtual bool equals (const object &obj) const noexcept
 Determines whether the specified object is equal to the current object. More...
 
virtual size_t get_hash_code () const noexcept
 Serves as a hash function for a particular type. More...
 
template<typename object_t >
std::unique_ptr< object_t > memberwise_clone () const
 Gets the type of the current instance. More...
 
- Static Public Member Functions inherited from xtd::object
static bool equals (const object &object_a, const object &object_b) noexcept
 Determines whether the specified object instances are considered equal. More...
 
static bool reference_equals (const object &object_a, const object &object_b) noexcept
 Determines whether the specified object instances are the same instance. More...
 
- Protected Member Functions inherited from xtd::forms::component
 component ()=default
 Initialises a new instance of the component class. More...
 
virtual bool can_raise_events () const
 Gets a value indicating whether the component can raise an event. More...
 
bool design_mode () const
 Gets a value that indicates whether the component is currently in design mode. More...
 

Constructor & Destructor Documentation

◆ status_bar_panel()

Member Function Documentation

◆ alignment() [1/2]

xtd::forms::horizontal_alignment xtd::forms::status_bar_panel::alignment ( ) const
noexcept

Gets the alignment of text and icons within the status bar panel.

Returns
One of the xtd::forms::horizontal_alignment values. The default is xtd::forms::horizontal_alignment::left.
Remarks
You can use this property to horizontally align the text and/or image assigned to the xtd::forms::status_bar_panel::image property within the borders of the panel. Text and im ge can be aligned to the left, right, or center of the xtd::forms::status_bar_panel. There is no way to independently position animage within the xtd::forms::status_bar_panel. For example, you cannot position an icon to the left side of the xtd::forms::status_bar_panel while aligning the text on the right side. The image is always positioned to the left side of the text regardless of how the text is aligned.

◆ alignment() [2/2]

status_bar_panel& xtd::forms::status_bar_panel::alignment ( xtd::forms::horizontal_alignment  value)

Sets the alignment of text and icons within the status bar panel.

Parameters
valueOne of the xtd::forms::horizontal_alignment values. The default is xtd::forms::horizontal_alignment::left.
Returns
This current instance.
Remarks
You can use this property to horizontally align the text and/or image assigned to the xtd::forms::status_bar_panel::image property within the borders of the panel. Text and im ge can be aligned to the left, right, or center of the xtd::forms::status_bar_panel. There is no way to independently position animage within the xtd::forms::status_bar_panel. For example, you cannot position an icon to the left side of the xtd::forms::status_bar_panel while aligning the text on the right side. The image is always positioned to the left side of the text regardless of how the text is aligned.

◆ auto_size() [1/2]

xtd::forms::status_bar_panel_auto_size xtd::forms::status_bar_panel::auto_size ( ) const
noexcept

Gets a value indicating whether the status bar panel is automatically resized.

Returns
One of the xtd::forms::status_bar_panel_auto_size values. The default is xtd::forms::status_bar_panel_auto_size::none.
Remarks
xtd::forms::status_bar_panel objects set to xtd::forms::status_bar_panel_auto_size::contents have precedence over those panels set to the xtd::forms::status_bar_panel_auto_size::spring value. For example, a xtd::forms::status_bar_panel that has its xtd::forms::status_bar_panel::auto_size property set to xtd::forms::status_bar_panel_auto_size::spring is shortened if a xtd::forms::status_bar_panel with the xtd::forms::status_bar_panel::auto_size property set to xtd::forms::status_bar_panel_auto_size::contents requires that space.
You can use xtd::forms::status_bar_panel::auto_size to ensure that the contents of a xtd::forms::status_bar_panel are properly displayed in a xtd::forms::status_bar control that contains more than one panel. For example, you might want a panel that contains text to adjust automatically to the amount of text it is displaying (xtd::forms::status_bar_panel_auto_size::contents), while another panel on the xtd::forms::status_bar that displays an owner-drawn progress bar would need to be a fixed size (xtd::forms::status_bar_panel_auto_size::none).

◆ auto_size() [2/2]

status_bar_panel& xtd::forms::status_bar_panel::auto_size ( xtd::forms::status_bar_panel_auto_size  value)

Sets a value indicating whether the status bar panel is automatically resized.

Parameters
valueOne of the xtd::forms::status_bar_panel_auto_size values. The default is xtd::forms::status_bar_panel_auto_size::none.
Returns
This current instance.
Remarks
xtd::forms::status_bar_panel objects set to xtd::forms::status_bar_panel_auto_size::contents have precedence over those panels set to the xtd::forms::status_bar_panel_auto_size::spring value. For example, a xtd::forms::status_bar_panel that has its xtd::forms::status_bar_panel::auto_size property set to xtd::forms::status_bar_panel_auto_size::spring is shortened if a xtd::forms::status_bar_panel with the xtd::forms::status_bar_panel::auto_size property set to xtd::forms::status_bar_panel_auto_size::contents requires that space.
You can use xtd::forms::status_bar_panel::auto_size to ensure that the contents of a xtd::forms::status_bar_panel are properly displayed in a xtd::forms::status_bar control that contains more than one panel. For example, you might want a panel that contains text to adjust automatically to the amount of text it is displaying (xtd::forms::status_bar_panel_auto_size::contents), while another panel on the xtd::forms::status_bar that displays an owner-drawn progress bar would need to be a fixed size (xtd::forms::status_bar_panel_auto_size::none).

◆ begin_init()

void xtd::forms::status_bar_panel::begin_init ( )

Begins the initialization of a xtd::forms::status_bar_panel.

Remarks
This method is used to start the initialization of a component that is used on a form or used by another component. The xtd::forms::status_bar_panel::end_init method ends the initialization. Using the xtd::forms::status_bar_panel::begin_init and xtd::forms::status_bar_panel::end_init methods prevents the control from being used before it is fully initialized.

◆ border_style() [1/2]

xtd::forms::status_bar_panel_border_style xtd::forms::status_bar_panel::border_style ( ) const
noexcept

Gets the border style of the status bar panel.

Returns
One of the xtd::forms::status_bar_panel_border_style values. The default is xtd::forms::status_bar_panel_border_style::sunken.
Remarks
You can use this property to differentiate a panel from other panels in a td::forms::status_bar control.

◆ border_style() [2/2]

status_bar_panel& xtd::forms::status_bar_panel::border_style ( xtd::forms::status_bar_panel_border_style  value)

Sets the border style of the status bar panel.

Parameters
valueOne of the xtd::forms::status_bar_panel_border_style values. The default is xtd::forms::status_bar_panel_border_style::sunken.
Returns
This current instance.
Remarks
You can use this property to differentiate a panel from other panels in a td::forms::status_bar control.

◆ control() [1/3]

std::optional<std::reference_wrapper<xtd::forms::control> > xtd::forms::status_bar_panel::control ( ) const
noexcept

Gets the control to be displayed in the control status bar panel.

Returns
A xtd::forms::control to be displayed in the control status bar panel. The default is std::nullopt.
Remarks
You can specify a xtd::forms::control to be displayed. This property is not used unless the xtd::forms::status_bar_panel::style property value is set to xtd::forms::status_bar_panel_style::control.

◆ control() [2/3]

status_bar_panel& xtd::forms::status_bar_panel::control ( const xtd::forms::control value)

Sets the control to be displayed in the control status bar panel.

Parameters
valueA xtd::forms::control to be displayed in the control status bar panel. The default is std::nullopt.
Returns
This current instance.
Remarks
You can specify a xtd::forms::control to be displayed. This property is not used unless the xtd::forms::status_bar_panel::style property value is set to xtd::forms::status_bar_panel_style::control.

◆ control() [3/3]

status_bar_panel& xtd::forms::status_bar_panel::control ( std::nullptr_t  value)

Resets the control to be displayed in the control status bar panel.

Parameters
valuenullptr.
Returns
This current instance.
Remarks
You can specify a xtd::forms::control to be displayed. This property is not used unless the xtd::forms::status_bar_panel::style property value is set to xtd::forms::status_bar_panel_style::control.

◆ create_control() [1/2]

static status_bar_panel xtd::forms::status_bar_panel::create_control ( const xtd::ustring text,
const xtd::forms::control control 
)
static

A factory to create a control status bar panel with specified text and control.

Parameters
textThe text displayed on the status bar panel.
controlA xtd::forms::control to be displayed in the control status bar panel.
Returns
New xtd::forms::status_bar_panel created.

◆ create_control() [2/2]

static status_bar_panel xtd::forms::status_bar_panel::create_control ( const xtd::forms::control control)
static

A factory to create a control status bar panel with specified control.

Parameters
controlA xtd::forms::control to be displayed in the control status bar panel.
Returns
New xtd::forms::status_bar_panel created.

◆ create_panel() [1/3]

static status_bar_panel xtd::forms::status_bar_panel::create_panel ( const xtd::ustring text)
static

A factory to create a status bar panel with specified text.

Parameters
textThe text displayed on the status bar panel.
Returns
New xtd::forms::status_bar_panel created.

◆ create_panel() [2/3]

static status_bar_panel xtd::forms::status_bar_panel::create_panel ( const xtd::drawing::image image)
static

A factory to create a status bar panel with specified image index.

Parameters
imageThe xtd::drawing::image assigned to the status bar panel.
Returns
New xtd::forms::status_bar_panel created.

◆ create_panel() [3/3]

static status_bar_panel xtd::forms::status_bar_panel::create_panel ( const xtd::ustring text,
const xtd::drawing::image image 
)
static

A factory to create a status bar panel with specified text and image index.

Parameters
textThe text displayed on the status bar panel.
imageThe xtd::drawing::image assigned to the status bar panel.
Returns
New xtd::forms::status_bar_panel created.

◆ end_init()

void xtd::forms::status_bar_panel::end_init ( )

Ends the initialization of a xtd::forms::status_bar_panel.

Remarks
This method is used to end the initialization of a component that is used on a form or used by another component. The xtd::forms::status_bar_panel::end_init method ends the initialization. Using the xtd::forms::status_bar_panel::begin_init and xtd::forms::status_bar_panel::end_init methods prevents the control from being used before it is fully initialized.

◆ image() [1/2]

const xtd::drawing::image& xtd::forms::status_bar_panel::image ( ) const
noexcept

Gets the image to display within the status bar panel.

Returns
An xtd::drawing::image that represents the image to display in the panel.
Remarks
You can use this property to display an image that represents the state of your application or a process within your application. For example, you can display an image in a xtd::forms::status_bar_panel to indicate whether a file save operation is in progress or complete.
Note
There is no way to independently position an image within the xtd::forms::status_bar_panel. For example, you cannot position an image to the left side of the xtd::forms::status_bar_panel while aligning the text on the right side using the xtd::forms::status_bar_panel::alignment property. The image is always positioned to the left side of the panel's text regardless of how the text is aligned.

◆ image() [2/2]

status_bar_panel& xtd::forms::status_bar_panel::image ( const xtd::drawing::image value)

Sets the image to display within the status bar panel.

Parameters
valueAn xtd::drawing::image that represents the image to display in the panel.
Returns
This current instance.
Remarks
You can use this property to display an image that represents the state of your application or a process within your application. For example, you can display an image in a xtd::forms::status_bar_panel to indicate whether a file save operation is in progress or complete.
Note
There is no way to independently position an image within the xtd::forms::status_bar_panel. For example, you cannot position an image to the left side of the xtd::forms::status_bar_panel while aligning the text on the right side using the xtd::forms::status_bar_panel::alignment property. The image is always positioned to the left side of the panel's text regardless of how the text is aligned.

◆ min_width() [1/2]

int32_t xtd::forms::status_bar_panel::min_width ( ) const
noexcept

Gets the minimum allowed width of the status bar panel within the xtd::forms::status_bar control.

Returns
The minimum width, in pixels, of the xtd::forms::status_bar_panel
Remarks
The xtd::forms::status_bar_panel::min_width property is used when the xtd::forms::status_bar_panel::auto_size property is set to xtd::forms::status_bar_panel_auto_size::contents or xtd::forms::status_bar_panel_auto_size::spring to prevent the xtd::forms::status_bar_panel from automatically resizing to a width that is too small. When the xtd::forms::status_bar_panel::auto_size property is set to xtd::forms::status_bar_panel_auto_size::none, the xtd::forms::status_bar_panel::min_width property is automatically set to the same value as the xtd::forms::status_bar_panel::width property.

◆ min_width() [2/2]

status_bar_panel& xtd::forms::status_bar_panel::min_width ( int32_t  value)

Sets the minimum allowed width of the status bar panel within the xtd::forms::status_bar control.

Parameters
valueThe minimum width, in pixels, of the xtd::forms::status_bar_panel
Exceptions
xtd::argument_exceptionA value less than 0 is assigned to the property.
Remarks
The xtd::forms::status_bar_panel::min_width property is used when the xtd::forms::status_bar_panel::auto_size property is set to xtd::forms::status_bar_panel_auto_size::contents or xtd::forms::status_bar_panel_auto_size::spring to prevent the xtd::forms::status_bar_panel from automatically resizing to a width that is too small. When the xtd::forms::status_bar_panel::auto_size property is set to xtd::forms::status_bar_panel_auto_size::none, the xtd::forms::status_bar_panel::min_width property is automatically set to the same value as the xtd::forms::status_bar_panel::width property.

◆ name() [1/2]

const xtd::ustring& xtd::forms::status_bar_panel::name ( ) const
noexcept

◆ name() [2/2]

status_bar_panel& xtd::forms::status_bar_panel::name ( const xtd::ustring value)

Sets the name of the xtd::forms::status_bar_panel.

Parameters
valueThe name of the xtd::forms::status_bar_panel.
Returns
This current instance.
Remarks
The xtd::forms::status_bar_panel::name property corresponds to the key for a xtd::forms::status_bar_panel in the xtd::forms::status_bar::status_bar_panel_collection.

◆ parent()

std::optional<std::reference_wrapper<xtd::forms::status_bar> > xtd::forms::status_bar_panel::parent ( ) const
noexcept

Gets the xtd::forms::status_bar control that the status bar panel is assigned to.

Returns
The xtd::forms::status_bar control that the xtd::forms::status_bar_panel is assigned to.

◆ style() [1/2]

xtd::forms::status_bar_panel_style xtd::forms::status_bar_panel::style ( ) const
noexcept

Gets the style of the status bar panel.

Returns
One of the xtd::forms::status_bar_panel_style values. The default is xtd::forms::status_bar_panel_style::text.
Remarks
You can use this property to indicate whether a xtd::forms::status_bar_panel displays text or whether the panel is managed as an owner-drawn xtd::forms::status_bar_panel. To determine when a xtd::forms::status_bar_panel needs to be drawn, create an event handler for the xtd::forms::status_bar::draw_item event of the xtd::forms::status_bar control. The xtd::forms::status_bar_draw_item_event_args passed as a parameter to an event handler of the xtd::forms::status_bar::draw_item event enables you to determine which panel needs to be drawn. The xtd::forms::status_bar_draw_item_event_args also provides a xtd::drawing::graphics object you can use to perform drawing tasks on the xtd::forms::status_bar_panel.

◆ style() [2/2]

status_bar_panel& xtd::forms::status_bar_panel::style ( xtd::forms::status_bar_panel_style  value)

Sets the style of the status bar panel.

Parameters
valueOne of the xtd::forms::status_bar_panel_style values. The default is xtd::forms::status_bar_panel_style::text.
Returns
This current instance.
Remarks
You can use this property to indicate whether a xtd::forms::status_bar_panel displays text or whether the panel is managed as an owner-drawn xtd::forms::status_bar_panel. To determine when a xtd::forms::status_bar_panel needs to be drawn, create an event handler for the xtd::forms::status_bar::draw_item event of the xtd::forms::status_bar control. The xtd::forms::status_bar_draw_item_event_args passed as a parameter to an event handler of the xtd::forms::status_bar::draw_item event enables you to determine which panel needs to be drawn. The xtd::forms::status_bar_draw_item_event_args also provides a xtd::drawing::graphics object you can use to perform drawing tasks on the xtd::forms::status_bar_panel.

◆ tag() [1/2]

std::any xtd::forms::status_bar_panel::tag ( ) const
noexcept

Gets an object that contains data about the xtd::forms::status_bar_panel.

Returns
An std::any that contains data about the xtd::forms::status_bar_panel. The default is empty.
Remarks
Retrieves or assigns the data currently associated with the xtd::forms::status_bar_panel. Any std::any type can be assigned to this property.

◆ tag() [2/2]

status_bar_panel& xtd::forms::status_bar_panel::tag ( std::any  value)

Sets an object that contains data about the xtd::forms::status_bar_panel.

Parameters
valueAn std::any that contains data about the xtd::forms::status_bar_panel. The default is empty.
Returns
This current instance.
Remarks
Retrieves or assigns the data currently associated with the xtd::forms::status_bar_panel. Any std::any type can be assigned to this property.

◆ text() [1/2]

const xtd::ustring& xtd::forms::status_bar_panel::text ( ) const
noexcept

Gets the text of the status bar panel.

Returns
The text displayed in the panel. The default is an empty string ("").
Remarks
This property represents the text that is displayed when the xtd::forms::status_bar_panel::style property is set to xtd::forms::status_bar_panel::text. You can use this property to display information about your application in a xtd::forms::status_bar control. For example, you can use the xtd::forms::status_bar_panel::text property to display Help information when the user moves the mouse over a menu or to display the name and location of a file that is opened in an application. To align the text within a xtd::forms::status_bar_panel, use the xtd::forms::status_bar_panel::alignment property.

◆ text() [2/2]

status_bar_panel& xtd::forms::status_bar_panel::text ( const xtd::ustring value)

Sets the text of the status bar panel.

Parameters
valueThe text displayed in the panel. The default is an empty string ("").
Returns
This current instance.
Remarks
This property represents the text that is displayed when the xtd::forms::status_bar_panel::style property is set to xtd::forms::status_bar_panel::text. You can use this property to display information about your application in a xtd::forms::status_bar control. For example, you can use the xtd::forms::status_bar_panel::text property to display Help information when the user moves the mouse over a menu or to display the name and location of a file that is opened in an application. To align the text within a xtd::forms::status_bar_panel, use the xtd::forms::status_bar_panel::alignment property.

◆ to_string()

xtd::ustring xtd::forms::status_bar_panel::to_string ( ) const
overridevirtualnoexcept

Returns a string that represents the xtd::forms::status_bar_panel control.

Returns
A xtd::ustring that represents the current xtd::forms::status_bar_panel.
Remarks
The xtd::forms::status_bar_panel::to_string method returns a string that includes the type and the value of the xtd::forms::status_bar_panel::style and xtd::forms::status_bar_panel::text properties.

Reimplemented from xtd::object.

◆ tool_tip_text() [1/2]

const xtd::ustring& xtd::forms::status_bar_panel::tool_tip_text ( ) const
noexcept

Gets ToolTip text associated with the status bar panel.

Returns
The ToolTip text for the panel.
Remarks
You can use this property to display additional information in a ToolTip when the mouse pointer rests on a xtd::forms::status_bar_panel. For example, you can display a ToolTip that provides data transfer speed for a xtd::forms::status_bar_panel that displays the status of a file transfer.
To display ToolTips for other controls in your application, use the xtd::forms::tool_tip control.

◆ tool_tip_text() [2/2]

status_bar_panel& xtd::forms::status_bar_panel::tool_tip_text ( const xtd::ustring value)

Sets ToolTip text associated with the status bar panel.

Parameters
valueThe ToolTip text for the panel.
Returns
This current instance.
Remarks
You can use this property to display additional information in a ToolTip when the mouse pointer rests on a xtd::forms::status_bar_panel. For example, you can display a ToolTip that provides data transfer speed for a xtd::forms::status_bar_panel that displays the status of a file transfer.
To display ToolTips for other controls in your application, use the xtd::forms::tool_tip control.

◆ width() [1/2]

int32_t xtd::forms::status_bar_panel::width ( ) const
noexcept

Gets the width of the status bar panel within the xtd::forms::status_bar control.

Returns
The width, in pixels, of the xtd::forms::status_bar_panel.
Remarks
The xtd::forms::status_bar_panel::width property always reflects the actual width of a xtd::forms::status_bar_panel and cannot be smaller than the xtd::forms::status_bar_panel::min_width property. To automatically resize the width of the xtd::forms::status_bar_panel to the contents of the xtd::forms::status_bar_panel, you can use the xtd::forms::status_bar_panel::auto_size property.

◆ width() [2/2]

status_bar_panel& xtd::forms::status_bar_panel::width ( int32_t  value)

Sets the width of the status bar panel within the xtd::forms::status_bar control.

Parameters
valueThe width, in pixels, of the xtd::forms::status_bar_panel.
Returns
This current instance.
Remarks
The xtd::forms::status_bar_panel::width property always reflects the actual width of a xtd::forms::status_bar_panel and cannot be smaller than the xtd::forms::status_bar_panel::min_width property. To automatically resize the width of the xtd::forms::status_bar_panel to the contents of the xtd::forms::status_bar_panel, you can use the xtd::forms::status_bar_panel::auto_size property.

The documentation for this class was generated from the following file: