pub fn item_text(&self, tree_item: &TreeItem) -> Option<String> {
        use winapi::um::commctrl::{TVM_GETITEMW, TVIF_TEXT, TVIF_HANDLE};
        const BUFFER_MAX: usize = 260;

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

        let mut text_buffer = Vec::with_capacity(BUFFER_MAX);
        unsafe { text_buffer.set_len(BUFFER_MAX); }

        let mut item: TVITEMW = blank_item();
        item.mask = TVIF_TEXT | TVIF_HANDLE;
        item.hItem = tree_item.handle;
        item.pszText = text_buffer.as_mut_ptr();
        item.cchTextMax = BUFFER_MAX as _;
        
        let result = wh::send_message(handle, TVM_GETITEMW, 0, &mut item as *mut TVITEMW as LPARAM);
        if result == 0 {
            return None;
        }

        Some(from_utf16(&text_buffer))
    }
/// Returns the text of the selected item. Return None if the item is not in the tree view.
/// The returned text value cannot be bigger than 260 characters
Returns the text of the selected item. Return None if the item is not in the tree view.
The returned text value cannot be bigger than 260 characters
Returns the text of the selected item . Return None if the item is not in the tree view . The returned text value cannot be bigger than 260 characters
pub fn item_text(&self, tree_item: &TreeItem) -> Option<String> {
        use winapi::um::commctrl::{TVM_GETITEMW, TVIF_TEXT, TVIF_HANDLE};
        const BUFFER_MAX: usize = 260;
        let handle = check_hwnd(&self.handle, NOT_BOUND, BAD_HANDLE);
        let mut text_buffer = Vec::with_capacity(BUFFER_MAX);
        unsafe { text_buffer.set_len(BUFFER_MAX); }
        let mut item: TVITEMW = blank_item();
        item.mask = TVIF_TEXT | TVIF_HANDLE;
        item.hItem = tree_item.handle;
        item.pszText = text_buffer.as_mut_ptr();
        item.cchTextMax = BUFFER_MAX as _;
        let result = wh::send_message(handle, TVM_GETITEMW, 0, &mut item as *mut TVITEMW as LPARAM);
        if result == 0 {
            return None;
        }
        Some(from_utf16(&text_buffer))
    }
pub fn item_text ( & self , tree_item : & TreeItem ) -> Option < String > { use winapi :: um :: commctrl :: { TVM_GETITEMW , TVIF_TEXT , TVIF_HANDLE } ; const BUFFER_MAX : usize = 260 ; let handle = check_hwnd ( & self . handle , NOT_BOUND , BAD_HANDLE ) ; let mut text_buffer = Vec :: with_capacity ( BUFFER_MAX ) ; unsafe { text_buffer . set_len ( BUFFER_MAX ) ; } let mut item : TVITEMW = blank_item ( ) ; item . mask = TVIF_TEXT | TVIF_HANDLE ; item . hItem = tree_item . handle ; item . pszText = text_buffer . as_mut_ptr ( ) ; item . cchTextMax = BUFFER_MAX as _ ; let result = wh :: send_message ( handle , TVM_GETITEMW , 0 , & mut item as * mut TVITEMW as LPARAM ) ; if result == 0 { return None ; } Some ( from_utf16 ( & text_buffer ) ) }
Returns the text of the selected item.
Returns the text of the selected item .
&self
tree_item
&TreeItem