pub fn update_column<I: Into<InsertListViewColumn>>(&self, index: usize, column: I) {
        use winapi::um::commctrl::LVM_SETCOLUMNW;

        if !self.has_column(index) {
            return;
        }

        let handle = check_hwnd(&self.handle, NOT_BOUND, BAD_HANDLE);
        let insert = column.into();

        let use_text = insert.text.is_some();
        let use_width = insert.width.is_some();
        let use_fmt = insert.fmt.is_some();

        let mut mask = 0;
        if use_text { mask |= LVCF_TEXT; }
        if use_width { mask |= LVCF_WIDTH; }
        if use_fmt { mask |= LVCF_FMT; }

        let text = insert.text.unwrap_or("".to_string());
        let mut text = to_utf16(&text);

        let mut item: LVCOLUMNW = unsafe { mem::zeroed() };
        item.mask = mask;
        item.fmt = insert.fmt.unwrap_or(ListViewColumnFlags::empty()).bits() as _;
        item.cx = insert.width.unwrap_or(0);

        if use_text {
            item.pszText = text.as_mut_ptr();
            item.cchTextMax = text.len() as i32;
        }

        wh::send_message(handle, LVM_SETCOLUMNW, index as _, &mut item as *mut LVCOLUMNW as _);
    }
/// Sets the information of a column. Does nothing if there is no column at the selected index
Sets the information of a column. Does nothing if there is no column at the selected index
Sets the information of a column . Does nothing if there is no column at the selected index
pub fn update_column<I: Into<InsertListViewColumn>>(&self, index: usize, column: I) {
        use winapi::um::commctrl::LVM_SETCOLUMNW;
        if !self.has_column(index) {
            return;
        }
        let handle = check_hwnd(&self.handle, NOT_BOUND, BAD_HANDLE);
        let insert = column.into();
        let use_text = insert.text.is_some();
        let use_width = insert.width.is_some();
        let use_fmt = insert.fmt.is_some();
        let mut mask = 0;
        if use_text { mask |= LVCF_TEXT; }
        if use_width { mask |= LVCF_WIDTH; }
        if use_fmt { mask |= LVCF_FMT; }
        let text = insert.text.unwrap_or("".to_string());
        let mut text = to_utf16(&text);
        let mut item: LVCOLUMNW = unsafe { mem::zeroed() };
        item.mask = mask;
        item.fmt = insert.fmt.unwrap_or(ListViewColumnFlags::empty()).bits() as _;
        item.cx = insert.width.unwrap_or(0);
        if use_text {
            item.pszText = text.as_mut_ptr();
            item.cchTextMax = text.len() as i32;
        }
        wh::send_message(handle, LVM_SETCOLUMNW, index as _, &mut item as *mut LVCOLUMNW as _);
    }
pub fn update_column < I : Into < InsertListViewColumn > > ( & self , index : usize , column : I ) { use winapi :: um :: commctrl :: LVM_SETCOLUMNW ; if ! self . has_column ( index ) { return ; } let handle = check_hwnd ( & self . handle , NOT_BOUND , BAD_HANDLE ) ; let insert = column . into ( ) ; let use_text = insert . text . is_some ( ) ; let use_width = insert . width . is_some ( ) ; let use_fmt = insert . fmt . is_some ( ) ; let mut mask = 0 ; if use_text { mask |= LVCF_TEXT ; } if use_width { mask |= LVCF_WIDTH ; } if use_fmt { mask |= LVCF_FMT ; } let text = insert . text . unwrap_or ( " " . to_string ( ) ) ; let mut text = to_utf16 ( & text ) ; let mut item : LVCOLUMNW = unsafe { mem :: zeroed ( ) } ; item . mask = mask ; item . fmt = insert . fmt . unwrap_or ( ListViewColumnFlags :: empty ( ) ) . bits ( ) as _ ; item . cx = insert . width . unwrap_or ( 0 ) ; if use_text { item . pszText = text . as_mut_ptr ( ) ; item . cchTextMax = text . len ( ) as i32 ; } wh :: send_message ( handle , LVM_SETCOLUMNW , index as _ , & mut item as * mut LVCOLUMNW as _ ) ; }
Sets the information of a column.
Sets the information of a column .
&self
index
usize
column
I