/// Adds many columns at once by sending an
/// [`lvm::InsertColumn`](crate::msg::lvm::InsertColumn) message.
///
/// Widths will be adjusted to match current system DPI.
///
/// # Examples
///
/// ```rust,no_run
/// use winsafe::prelude::*;
/// use winsafe::gui;
///
/// let my_list: gui::ListView; // initialized somewhere
/// # let wnd = gui::WindowMain::new(gui::WindowMainOpts::default());
/// # let my_list = gui::ListView::new(&wnd, gui::ListViewOpts::default());
///
/// my_list.columns().add(&[
///     ("Name", 300),
///     ("Address", 500),
/// ]);
/// ```



Widths will be adjusted to match current system DPI.
Widths will be adjusted to match current system DPI .
pub fn add(&self, texts_and_widths: &[(impl AsRef<str>, u32)]) {
		for (text, width) in texts_and_widths.iter() {
			let mut col_cx = SIZE::new(*width as _, 0);
			multiply_dpi(None, Some(&mut col_cx));
			let mut lvc = LVCOLUMN::default();
			lvc.mask = co::LVCF::TEXT | co::LVCF::WIDTH;
			lvc.cx = col_cx.cx;
			let mut wtext = WString::from_str(text.as_ref());
			lvc.set_pszText(Some(&mut wtext));
			self.owner.hwnd()
				.SendMessage(lvm::InsertColumn {
					index: 0xffff, // insert as the last columns
					lvcolumn: &lvc,
				})
				.unwrap();
		}
	}
pub fn add ( & self , texts_and_widths : & [ ( impl AsRef < str > , u32 ) ] ) { for ( text , width ) in texts_and_widths . iter ( ) { let mut col_cx = SIZE :: new ( * width as _ , 0 ) ; multiply_dpi ( None , Some ( & mut col_cx ) ) ; let mut lvc = LVCOLUMN :: default ( ) ; lvc . mask = co :: LVCF :: TEXT | co :: LVCF :: WIDTH ; lvc . cx = col_cx . cx ; let mut wtext = WString :: from_str ( text . as_ref ( ) ) ; lvc . set_pszText ( Some ( & mut wtext ) ) ; self . owner . hwnd ( ) . SendMessage ( lvm :: InsertColumn { index : 0xffff , // insert as the last columns
 lvcolumn : & lvc , } ) . unwrap ( ) ; } }
Adds many columns at once by sending an
[`lvm::InsertColumn`](crate::msg::lvm::InsertColumn) message.
Adds many columns at once by sending an [ ` lvm :: InsertColumn ` ] ( crate :: msg :: lvm :: InsertColumn ) message .
&self
texts_and_widths
&[(impl AsRef<str>, u32)]
examples

```rust,no_run
use winsafe::prelude::*;
use winsafe::gui.

let my_list: gui::ListView; // initialized somewhere
` ` ` rust no_run use winsafe :: prelude :: * ; use winsafe :: gui . let my_list : gui :: ListView ; // initialized somewhere
let wnd = gui::windowmain::new(gui::windowmainopts::default());

None
let my_list = gui::listview::new(&wnd, gui::listviewopts::default());

None