[][src]Struct native_windows_gui::StatusBar

pub struct StatusBar {
    pub handle: ControlHandle,
    // some fields omitted
}

A status bar is a horizontal window at the bottom of a parent window in which an application can display various kinds of status information. Status bar cannot stack, so there must be only one per window.

Requires the status-bar feature.

Builder parameters:

  • parent: Required. The status bar parent container.
  • text: The status bar text.
  • font: The font used for the status bar text

Control events:

  • MousePress(_): Generic mouse press events on the status bar
  • OnMouseMove: Generic mouse mouse event
  • OnMouseWheel: Generic mouse wheel event
use native_windows_gui as nwg;
fn build_status(status: &mut nwg::StatusBar, window: &nwg::Window, font: &nwg::Font) {
    nwg::StatusBar::builder()
        .text("Hello")
        .font(Some(font))
        .parent(window)
        .build(status);
}

Fields

handle: ControlHandle

Implementations

impl StatusBar[src]

pub fn builder<'a>() -> StatusBarBuilder<'a>[src]

pub fn set_min_height(&self, height: u32)[src]

Set the minimum height of the statusbar (in pixels)

pub fn font(&self) -> Option<Font>[src]

Return the font of the control

pub fn set_font(&self, font: Option<&Font>)[src]

Set the font of the control

pub fn text<'a>(&self, index: u8) -> String[src]

Return the text in one of the region of the status bar

pub fn set_text<'a>(&self, index: u8, text: &'a str)[src]

Set the text in one of the region of the status bar

pub fn class_name(&self) -> &'static str[src]

Winapi class name used during control creation

pub fn flags(&self) -> u32[src]

Winapi base flags used during window creation

pub fn forced_flags(&self) -> u32[src]

Winapi flags required by the control

pub fn hook_parent_resize(&self)[src]

Status bar do not resize automatically. Instead, a resize message must be manually sent by the parent window to trigger the resize action.

Trait Implementations

impl Default for StatusBar[src]

impl Drop for StatusBar[src]

impl From<&'_ StatusBar> for ControlHandle[src]

impl PartialEq<ControlHandle> for StatusBar[src]

impl PartialEq<StatusBar> for StatusBar[src]

impl PartialEq<StatusBar> for ControlHandle[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.