pub struct ListViewColumns<'a> { /* private fields */ }gui only.Expand description
Exposes column methods of a ListView control.
You cannot directly instantiate this object, it is created internally by the control.
Implementations
sourceimpl<'a> ListViewColumns<'a>
impl<'a> ListViewColumns<'a>
sourcepub fn add(&self, texts_and_widths: &[(impl AsRef<str>, u32)])
pub fn add(&self, texts_and_widths: &[(impl AsRef<str>, u32)])
Adds many columns at once by sending an
lvm::InsertColumn message.
Widths will be adjusted to match current system DPI.
Examples
use winsafe::prelude::*;
use winsafe::gui;
let my_list: gui::ListView; // initialized somewhere
my_list.columns().add(&[
("Name", 300),
("Address", 500),
]);sourcepub fn count(&self) -> u32
pub fn count(&self) -> u32
Retrieves the number of columns by sending an
hdm::GetItemCount message to the
handle returned by lvm::GetHeader.
sourcepub fn info(&self, column_index: u32, lvc: &mut LVCOLUMN<'_>)
pub fn info(&self, column_index: u32, lvc: &mut LVCOLUMN<'_>)
Retrieves information about the column by sending an
lvm::GetColumn message.
sourcepub fn set_info(&self, column_index: u32, lvc: &LVCOLUMN<'_>)
pub fn set_info(&self, column_index: u32, lvc: &LVCOLUMN<'_>)
Sets information of the column by sending an
lvm::SetColumn message.
sourcepub fn set_title(&self, column_index: u32, text: &str)
pub fn set_title(&self, column_index: u32, text: &str)
Sets the title of the column by calling
set_info.
sourcepub fn set_width(&self, column_index: u32, width: u32)
pub fn set_width(&self, column_index: u32, width: u32)
Sets the width of the column by sending an
lvm::SetColumnWidth message.
Width will be adjusted to match current system DPI.
sourcepub fn set_width_to_fill(&self, column_index: u32)
pub fn set_width_to_fill(&self, column_index: u32)
Sets the width of the column by sending an
lvm::SetColumnWidth message. The
width will be calculated to fill the remaining space.
sourcepub fn title(&self, column_index: u32) -> String
pub fn title(&self, column_index: u32) -> String
Retrieves the title of the column by calling
info.
sourcepub fn width(&self, column_index: u32) -> u32
pub fn width(&self, column_index: u32) -> u32
Retrieves the width of the column by sending an
lvm::GetColumnWidth message.
Auto Trait Implementations
impl<'a> !RefUnwindSafe for ListViewColumns<'a>
impl<'a> !Send for ListViewColumns<'a>
impl<'a> !Sync for ListViewColumns<'a>
impl<'a> Unpin for ListViewColumns<'a>
impl<'a> !UnwindSafe for ListViewColumns<'a>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more