pub struct ListBox(/* private fields */);
Available on crate feature
gui
only.Expand description
Implementations§
source§impl ListBox
impl ListBox
sourcepub fn new(parent: &impl GuiParent, opts: ListBoxOpts) -> Self
pub fn new(parent: &impl GuiParent, opts: ListBoxOpts) -> Self
Instantiates a new ListBox
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 ListBox
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 ListBox
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 ListBox
in an event closure.
sourcepub const fn items(&self) -> ListBoxItems<'_>
pub const fn items(&self) -> ListBoxItems<'_>
Item methods.
sourcepub fn set_horizontal_extend(&self, pixels: u32)
pub fn set_horizontal_extend(&self, pixels: u32)
Sets the scrollable width by sending an
lb::SetHorizontalExtent
message.
Trait Implementations§
source§impl GuiChildFocus for ListBox
impl GuiChildFocus for ListBox
source§fn focus(&self)
fn focus(&self)
In a raw, ordinary window, simply calls
HWND:SetFocus
. Read moresource§impl GuiNativeControl for ListBox
impl GuiNativeControl for ListBox
source§fn on_subclass(&self) -> &WindowEvents
fn on_subclass(&self) -> &WindowEvents
Exposes the subclass events. If at least one event exists, the control
will be
subclassed. Read more
source§impl GuiNativeControlEvents<ListBoxEvents> for ListBox
impl GuiNativeControlEvents<ListBoxEvents> for ListBox
source§fn on(&self) -> &ListBoxEvents
fn on(&self) -> &ListBoxEvents
Exposes the specific control events. Read more
impl Send for ListBox
Auto Trait Implementations§
impl Freeze for ListBox
impl !RefUnwindSafe for ListBox
impl !Sync for ListBox
impl Unpin for ListBox
impl !UnwindSafe for ListBox
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more