pub fn sync(&self) {
        use winapi::um::winuser::{LB_ADDSTRING, LB_INITSTORAGE};

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

        self.clear_inner(handle);

        let item_count = self.collection.borrow().len();
        wh::send_message(handle, LB_INITSTORAGE, item_count as WPARAM, (10*item_count) as LPARAM);

        for item in self.collection.borrow().iter() {
            let display = format!("{}", item);
            let display_os = to_utf16(&display);
            
            unsafe {
                wh::send_message(handle, LB_ADDSTRING, 0, mem::transmute(display_os.as_ptr()));
            }
        }
    }
/// Update the visual of the control with the inner collection.
/// This rebuild every item in the list box and can take some time on big collections.
Update the visual of the control with the inner collection.
This rebuild every item in the list box and can take some time on big collections.
Update the visual of the control with the inner collection . This rebuild every item in the list box and can take some time on big collections .
pub fn sync(&self) {
        use winapi::um::winuser::{LB_ADDSTRING, LB_INITSTORAGE};
        let handle = check_hwnd(&self.handle, NOT_BOUND, BAD_HANDLE);
        self.clear_inner(handle);
        let item_count = self.collection.borrow().len();
        wh::send_message(handle, LB_INITSTORAGE, item_count as WPARAM, (10*item_count) as LPARAM);
        for item in self.collection.borrow().iter() {
            let display = format!("{}", item);
            let display_os = to_utf16(&display);
            unsafe {
                wh::send_message(handle, LB_ADDSTRING, 0, mem::transmute(display_os.as_ptr()));
            }
        }
    }
pub fn sync ( & self ) { use winapi :: um :: winuser :: { LB_ADDSTRING , LB_INITSTORAGE } ; let handle = check_hwnd ( & self . handle , NOT_BOUND , BAD_HANDLE ) ; self . clear_inner ( handle ) ; let item_count = self . collection . borrow ( ) . len ( ) ; wh :: send_message ( handle , LB_INITSTORAGE , item_count as WPARAM , ( 10 * item_count ) as LPARAM ) ; for item in self . collection . borrow ( ) . iter ( ) { let display = format ! ( " " item ) ; let display_os = to_utf16 ( & display ) ; unsafe { wh :: send_message ( handle , LB_ADDSTRING , 0 , mem :: transmute ( display_os . as_ptr ( ) ) ) ; } } }
Update the visual of the control with the inner collection.
Update the visual of the control with the inner collection .
&self