property Items.SelectableItem(Item as HITEM) as Boolean
Specifies whether the user can select the item. /*not supported in the lite version*/

 TypeDescription 
   Item as HITEM A long expression that indicates the handle of the item being selectable.  
   Boolean A boolean expression that specifies whether the item is selectable.  
By default, all items are selectable, excepts the locked items that are not selectable. A selectable item is an item that user can select using the keys or the mouse. The SelectableItem property specifies whether the user can select an item. The SelectableItem property doesn't change the item's appearance. The LockedItemCount property specifies the number of locked items to the top or bottom side of the control. Use the ItemDivider property to define a divider item. Use the ItemForeColor property to specify the item's foreground color. Use the ItemBackColor property to specify the item's background color. Use the ItemFont, ItemBold, ItemItalic, ItemUnderline or ItemStrikeOut property to assign a different font to the item. Use the EnableItem property to disable an item. A disabled item looks grayed, but it is selectable. For instance, the user can't change the check box state in a disabled item. Use the SelectItem property to select an item. The ItemFromPoint property gets the item from point. For instance, if the user clicks a non selectable item the SelectionChanged event is not fired. A non selectable item is not focusable as well. It means that if the incremental searching is on, the non selectable items are ignored. Use the SelectCount property to get the number of selected items. Use the SelForeColor and SelBackColor properties to customize the colors for selected items. 

The following VB sample makes not selectable the first visible item:

With Tree1.Items
    .SelectableItem(.FirstVisibleItem) = False
End With

The following C++ sample makes not selectable the first visible item:

#include "Items.h"
CItems items = m_tree.GetItems();
items.SetSelectableItem( items.GetFirstVisibleItem(), FALSE );

The following VB.NET sample makes not selectable the first visible item:

With AxTree1.Items
    .SelectableItem(.FirstVisibleItem) = False
End With

The following C# sample makes not selectable the first visible item:

axTree1.Items.set_SelectableItem(axTree1.Items.FirstVisibleItem, false);

The following VFP sample makes not selectable the first visible item:

with thisform.Tree1.Items
	.DefaultItem = .FirstVisibleItem
	.SelectableItem(0) = .f.
endwith
  

 


Send comments on this topic.
1999-2017 Exontrol.COM, Software. All rights reserved.