xtd 1.0.0
Loading...
Searching...
No Matches
xtd::forms::status_bar_panel Class Reference
Inheritance diagram for xtd::forms::status_bar_panel:
xtd::forms::component xtd::iequatable< status_bar_panel > xtd::object xtd::interface xtd::extensions::equality_operators< status_bar_panel, iequatable< status_bar_panel > >

Definition

Represents a xtd::forms::status_bar panel.

Header
#include <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>
namespace status_bar_example {
class form1 : public form {
public:
form1() {
text("Status bar example");
client_size({820, 500});
status_bar1.parent(*this);
status_bar1.panels().add_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 += delegate_ {
progress_bar1.value(progress_bar1.value() < progress_bar1.maximum() ? progress_bar1.value() + 1 : progress_bar1.minimum());
};
timer1.enabled(true);
}
private:
static auto image_from_color(const xtd::drawing::color& color)->image {
auto colored_bitmap = bitmap{16, 16};
auto g = graphics::from_image(colored_bitmap);
g.fill_ellipse(solid_brush(color), 0, 0, colored_bitmap.width(), colored_bitmap.height());
g.draw_ellipse(pens::black(), 0, 0, colored_bitmap.width() - 1, colored_bitmap.height() - 1);
return colored_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");
forms::timer timer1;
progress_bar progress_bar1;
status_bar_panel status_bar_panel4 = status_bar_panel::create_control(progress_bar1);
};
}
auto main() -> int {
application::run(status_bar_example::form1 {});
}
Represents a window or dialog box that makes up an application's user interface.
Definition form.hpp:54
auto text() const noexcept -> const xtd::string &
Gets the text of the status bar panel.
#define delegate_
The declaration of a delegate type is similar to a method signature. It has a return value and any nu...
Definition delegate.hpp:1018
xtd::forms::style_sheets::control status_bar_panel
The buttton data allows you to specify the box of a status_bar_panel control.
Definition status_bar_panel.hpp:25
@ g
The G key.
Definition console_key.hpp:100
@ sunken
Defines a sunken border. Same as xtd::forms::status_bar_panel_border_style::inset.
Definition status_bar_panel_border_style.hpp:32
@ spring
The xtd::forms::status_bar_panel shares the available space on the xtd::forms::status_bar (the space ...
Definition status_bar_panel_auto_size.hpp:26
@ contents
The width of the xtd::forms::status_bar_panel is determined by its contents.
Definition status_bar_panel_auto_size.hpp:28
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.

Public Constructors

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

Public Properties

auto alignment () const noexcept -> xtd::forms::horizontal_alignment
 Gets the alignment of text and icons within the status bar panel.
auto alignment (xtd::forms::horizontal_alignment value) -> status_bar_panel &
 Sets the alignment of text and icons within the status bar panel.
auto auto_size () const noexcept -> xtd::forms::status_bar_panel_auto_size
 Gets a value indicating whether the status bar panel is automatically resized.
auto auto_size (xtd::forms::status_bar_panel_auto_size value) -> status_bar_panel &
 Sets a value indicating whether the status bar panel is automatically resized.
auto border_style () const noexcept -> xtd::forms::status_bar_panel_border_style
 Gets the border style of the status bar panel.
auto border_style (xtd::forms::status_bar_panel_border_style value) -> status_bar_panel &
 Sets the border style of the status bar panel.
auto control () const noexcept -> std::optional< control_ref >
 Gets the control to be displayed in the control status bar panel.
auto control (const xtd::forms::control &value) -> status_bar_panel &
 Sets the control to be displayed in the control status bar panel.
auto control (xtd::null_ptr) -> status_bar_panel &
 Resets the control to be displayed in the control status bar panel.
auto image () const noexcept -> const xtd::drawing::image &
 Gets the image to display within the status bar panel.
auto image (const xtd::drawing::image &value) -> status_bar_panel &
 Sets the image to display within the status bar panel.
auto min_width () const noexcept -> xtd::int32
 Gets the minimum allowed width of the status bar panel within the xtd::forms::status_bar control.
auto min_width (xtd::int32 value) -> status_bar_panel &
 Sets the minimum allowed width of the status bar panel within the xtd::forms::status_bar control.
auto name () const noexcept -> const xtd::string &
 Gets the name of the xtd::forms::status_bar_panel.
auto name (const xtd::string &value) -> status_bar_panel &
 Sets the name of the xtd::forms::status_bar_panel.
auto parent () const noexcept -> std::optional< xtd::ref< xtd::forms::status_bar > >
 Gets the xtd::forms::status_bar control that the status bar panel is assigned to.
auto style () const noexcept -> xtd::forms::status_bar_panel_style
 Gets the style of the status bar panel.
auto style (xtd::forms::status_bar_panel_style value) -> status_bar_panel &
 Sets the style of the status bar panel.
auto tag () const noexcept -> const xtd::any_object &
 Gets an object that contains data about the xtd::forms::status_bar_panel.
auto tag (const xtd::any_object &value) -> status_bar_panel &
 Sets an object that contains data about the xtd::forms::status_bar_panel.
auto text () const noexcept -> const xtd::string &
 Gets the text of the status bar panel.
auto text (const xtd::string &value) -> status_bar_panel &
 Sets the text of the status bar panel.
auto tool_tip_text () const noexcept -> const xtd::string &
 Gets ToolTip text associated with the status bar panel.
auto tool_tip_text (const xtd::string &value) -> status_bar_panel &
 Sets ToolTip text associated with the status bar panel.
auto width () const noexcept -> xtd::int32
 Gets the width of the status bar panel within the xtd::forms::status_bar control.
auto width (xtd::int32 value) -> status_bar_panel &
 Sets the width of the status bar panel within the xtd::forms::status_bar control.

Public Methods

auto begin_init () -> void
 Begins the initialization of a xtd::forms::status_bar_panel.
auto equals (const xtd::object &obj) const noexcept -> bool override
 Determines whether the specified object is equal to the current object.
auto equals (const status_bar_panel &other) const noexcept -> bool override
 Determines whether the specified object is equal to the current object.
auto end_init () -> void
 Ends the initialization of a xtd::forms::status_bar_panel.
auto get_hash_code () const noexcept -> xtd::usize override
 Serves as a hash function for a particular type.
auto to_string () const noexcept -> xtd::string override
 Returns a string that represents the xtd::forms::status_bar_panel control.

Public Static Methods

static auto create_control (const xtd::string &text, const xtd::forms::control &control) -> status_bar_panel
 A factory to create a control status bar panel with specified text and control.
static auto create_control (const xtd::forms::control &control) -> status_bar_panel
 A factory to create a control status bar panel with specified control.
static auto create_panel (const xtd::string &text) -> status_bar_panel
 A factory to create a status bar panel with specified text.
static auto create_panel (const xtd::drawing::image &image) -> status_bar_panel
 A factory to create a status bar panel with specified image index.
static auto create_panel (const xtd::string &text, const xtd::drawing::image &image) -> status_bar_panel
 A factory to create a status bar panel with specified text and image index.

Additional Inherited Members

 object ()=default
 Create a new instance of the ultimate base class object.
virtual auto get_type () const noexcept -> type_object
 Gets the type of the current instance.
template<typename object_t>
auto memberwise_clone () const -> xtd::unique_ptr_object< object_t >
 Creates a shallow copy of the current object.
virtual auto equals (const status_bar_panel &) const noexcept -> bool=0
 Indicates whether the current object is equal to another object of the same type.
template<typename object_a_t, typename object_b_t>
static auto equals (const object_a_t &object_a, const object_b_t &object_b) noexcept -> bool
 Determines whether the specified object instances are considered equal.
template<typename object_a_t, typename object_b_t>
static auto reference_equals (const object_a_t &object_a, const object_b_t &object_b) noexcept -> bool
 Determines whether the specified object instances are the same instance.
 component ()
 Initialises a new instance of the component class.
virtual auto can_raise_events () const noexcept -> bool
 Gets a value indicating whether the component can raise an event.
auto design_mode () const noexcept -> bool
 Gets a value that indicates whether the component is currently in design mode.

Constructor & Destructor Documentation

◆ status_bar_panel()

Member Function Documentation

◆ alignment() [1/2]

auto xtd::forms::status_bar_panel::alignment ( ) const -> xtd::forms::horizontal_alignment
nodiscardnoexcept

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]

auto xtd::forms::status_bar_panel::alignment ( xtd::forms::horizontal_alignment value) -> status_bar_panel &

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]

auto xtd::forms::status_bar_panel::auto_size ( ) const -> xtd::forms::status_bar_panel_auto_size
nodiscardnoexcept

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]

auto xtd::forms::status_bar_panel::auto_size ( xtd::forms::status_bar_panel_auto_size value) -> status_bar_panel &

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).

◆ border_style() [1/2]

auto xtd::forms::status_bar_panel::border_style ( ) const -> xtd::forms::status_bar_panel_border_style
nodiscardnoexcept

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 xtd::forms::status_bar control.

◆ border_style() [2/2]

auto xtd::forms::status_bar_panel::border_style ( xtd::forms::status_bar_panel_border_style value) -> status_bar_panel &

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 xtd::forms::status_bar control.

◆ control() [1/3]

auto xtd::forms::status_bar_panel::control ( ) const -> std::optional< control_ref >
nodiscardnoexcept

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]

auto xtd::forms::status_bar_panel::control ( const xtd::forms::control & value) -> status_bar_panel &

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]

auto xtd::forms::status_bar_panel::control ( xtd::null_ptr ) -> status_bar_panel &

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

Parameters
xtd::null.
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.

◆ image() [1/2]

auto xtd::forms::status_bar_panel::image ( ) const -> const xtd::drawing::image &
nodiscardnoexcept

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]

auto xtd::forms::status_bar_panel::image ( const xtd::drawing::image & value) -> status_bar_panel &

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]

auto xtd::forms::status_bar_panel::min_width ( ) const -> xtd::int32
nodiscardnoexcept

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]

auto xtd::forms::status_bar_panel::min_width ( xtd::int32 value) -> status_bar_panel &

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]

auto xtd::forms::status_bar_panel::name ( ) const -> const xtd::string &
nodiscardnoexcept

◆ name() [2/2]

auto xtd::forms::status_bar_panel::name ( const xtd::string & value) -> status_bar_panel &

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()

auto xtd::forms::status_bar_panel::parent ( ) const -> std::optional< xtd::ref< xtd::forms::status_bar > >
nodiscardnoexcept

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]

auto xtd::forms::status_bar_panel::style ( ) const -> xtd::forms::status_bar_panel_style
nodiscardnoexcept

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]

auto xtd::forms::status_bar_panel::style ( xtd::forms::status_bar_panel_style value) -> status_bar_panel &

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]

auto xtd::forms::status_bar_panel::tag ( ) const -> const xtd::any_object &
nodiscardnoexcept

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

Returns
An xtd::any_object 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 xtd::any_object type can be assigned to this property.

◆ tag() [2/2]

auto xtd::forms::status_bar_panel::tag ( const xtd::any_object & value) -> status_bar_panel &

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

Parameters
valueAn xtd::any_object 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 xtd::any_object type can be assigned to this property.

◆ text() [1/2]

auto xtd::forms::status_bar_panel::text ( ) const -> const xtd::string &
nodiscardnoexcept

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]

auto xtd::forms::status_bar_panel::text ( const xtd::string & value) -> status_bar_panel &

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.

◆ tool_tip_text() [1/2]

auto xtd::forms::status_bar_panel::tool_tip_text ( ) const -> const xtd::string &
nodiscardnoexcept

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]

auto xtd::forms::status_bar_panel::tool_tip_text ( const xtd::string & value) -> status_bar_panel &

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]

auto xtd::forms::status_bar_panel::width ( ) const -> xtd::int32
nodiscardnoexcept

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]

auto xtd::forms::status_bar_panel::width ( xtd::int32 value) -> status_bar_panel &

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.

◆ begin_init()

auto xtd::forms::status_bar_panel::begin_init ( ) -> void

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.

◆ equals() [1/2]

auto xtd::forms::status_bar_panel::equals ( const xtd::object & obj) const -> bool
nodiscardoverridevirtualnoexcept

Determines whether the specified object is equal to the current object.

Parameters
objThe object to compare with the current object.
Returns
true if the specified object is equal to the current object. otherwise, false.

Reimplemented from xtd::object.

◆ equals() [2/2]

auto xtd::forms::status_bar_panel::equals ( const status_bar_panel & other) const -> bool
nodiscardoverridenoexcept

Determines whether the specified object is equal to the current object.

Parameters
otherThe object to compare with the current object.
Returns
true if the specified object is equal to the current object. otherwise, false.

◆ end_init()

auto xtd::forms::status_bar_panel::end_init ( ) -> void

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.

◆ get_hash_code()

auto xtd::forms::status_bar_panel::get_hash_code ( ) const -> xtd::usize
nodiscardoverridevirtualnoexcept

Serves as a hash function for a particular type.

Returns
A hash code for the current object.

Reimplemented from xtd::object.

◆ to_string()

auto xtd::forms::status_bar_panel::to_string ( ) const -> xtd::string
nodiscardoverridevirtualnoexcept

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

Returns
A xtd::string 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.

◆ create_control() [1/2]

auto xtd::forms::status_bar_panel::create_control ( const xtd::string & text,
const xtd::forms::control & control ) -> status_bar_panel
staticnodiscard

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]

auto xtd::forms::status_bar_panel::create_control ( const xtd::forms::control & control) -> status_bar_panel
staticnodiscard

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]

auto xtd::forms::status_bar_panel::create_panel ( const xtd::string & text) -> status_bar_panel
staticnodiscard

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]

auto xtd::forms::status_bar_panel::create_panel ( const xtd::drawing::image & image) -> status_bar_panel
staticnodiscard

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]

auto xtd::forms::status_bar_panel::create_panel ( const xtd::string & text,
const xtd::drawing::image & image ) -> status_bar_panel
staticnodiscard

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.

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