pub struct Trackbar(/* private fields */);
gui
only.Expand description
Native trackbar control.
Implementations§
source§impl Trackbar
impl Trackbar
sourcepub fn new(parent: &impl GuiParent, opts: TrackbarOpts) -> Self
pub fn new(parent: &impl GuiParent, opts: TrackbarOpts) -> Self
Instantiates a new Trackbar
object, to be created on the parent window
with
HWND::CreateWindowEx
.
§Panics
Panics if the parent window was already created – that is, you cannot
dynamically create a Trackbar
in an event closure.
sourcepub fn new_dlg(
parent: &impl GuiParent,
ctrl_id: u16,
resize_behavior: (Horz, Vert)
) -> Self
pub fn new_dlg( parent: &impl GuiParent, ctrl_id: u16, resize_behavior: (Horz, Vert) ) -> Self
Instantiates a new Trackbar
object, to be loaded from a dialog
resource with
HWND::GetDlgItem
.
§Panics
Panics if the parent dialog was already created – that is, you cannot
dynamically create a Trackbar
in an event closure.
sourcepub fn pos(&self) -> u32
pub fn pos(&self) -> u32
Retrieves the current position by sending a
trbm::GetPos
message.
sourcepub fn range(&self) -> (u32, u32)
pub fn range(&self) -> (u32, u32)
Retrieves the minimum and maximum position values by sending
trbm::GetRangeMin
and
trbm::GetRangeMax
messages.
sourcepub fn set_pos(&self, pos: u32)
pub fn set_pos(&self, pos: u32)
Sets the current position by sending a
trbm::SetPos
message.
sourcepub fn set_range(&self, min: u32, max: u32)
pub fn set_range(&self, min: u32, max: u32)
Sets the minimum and maximum position values by sending
trbm::SetRangeMin
and
trbm::SetRangeMax
messages.
Trait Implementations§
source§impl GuiChildFocus for Trackbar
impl GuiChildFocus for Trackbar
source§fn focus(&self)
fn focus(&self)
HWND:SetFocus
. Read more