TaskItems2::Add2 Method (String^, String^, String^, Int32, Object^, Boolean, String^, Int32, Boolean, Boolean, Boolean)
Adds a new task item to the TaskList.
Assembly: EnvDTE80 (in EnvDTE80.dll)
TaskItem^ Add2( String^ Category, String^ SubCategory, String^ Description, int Priority = 2, Object^ Icon, bool Checkable = false, String^ File = "", int Line = -1, bool CanUserDelete = true, bool FlushItem = true, bool AutoNavigate = false )
Parameters
- Category
-
Type:
System::String^
Required. Represents the category name of the task item.
- SubCategory
-
Type:
System::String^
Required. Represents the subcategory name of the task item.
- Description
-
Type:
System::String^
Required. Describes the task item.
- Priority
-
Type:
System::Int32
Optional. A vsTaskPriority constant denoting the priority of the task item: high, medium, or low. If the value is vsTaskPriorityHigh, an exclamation point icon is displayed in the first column of the Task List. If the value is vsTaskPriorityMedium, nothing is displayed. If the value is vsTaskPriorityLow, a down arrow icon is displayed.
- Icon
-
Type:
System::Object^
Optional. Determines the type of icon that represents the new task item. The setting must be either vsTaskIcon or an IPictureDisp.
- Checkable
-
Type:
System::Boolean
Optional. Indicates whether or not you want the task item to provide a checkbox that users can check to indicate the task is complete. The default value is false.
- File
-
Type:
System::String^
Optional. Indicates the file or path associated with the new task item. The default value is an empty string (""), and if this is used, IsSettable(vsTaskListColumnFile) returns false. The file name can be a full path, a relative path, or simply a file name. Note that associating a file or path with an item does not necessarily mean that it performs any actions.
- Line
-
Type:
System::Int32
Optional. Indicates the line in the source code associated with the new task item. The default value is 0, and if this is used, IsSettable(vsTaskListColumnLine) returns false. Note that associating a line number with an item does not necessarily mean that it performs any actions.
- CanUserDelete
-
Type:
System::Boolean
Optional. Indicates whether a user can delete the new task item by pressing DELETE when the item is selected in the environment. The default value is true.
- FlushItem
-
Type:
System::Boolean
Optional. Indicates whether a new item is immediately visible in the Task List. When FlushItem is set to true, the Task List is updated immediately after Add is called. When FlushItem is set to false, the Task List is updated later after all updates are made. A false setting is used primarily to enhance performance when you are adding a large number of items at a time to the Task List. The default value is true.
- AutoNavigate
-
Type:
System::Boolean
Optional. Indicates whether the TaskItem has the AutoNavigate feature enabled. AutoNavigate is on when this is set to true; otherwise, false.
When adding bitmaps, the RGB color 0x0000FF00 (green) is transparent. All places in your picture that use this value are transparent and the Task List shows through.
The width and height of bitmaps must be 16 x 16 pixels.
If using IPictureDisp, the PICTYPE argument must be set to either Icon or Bitmap. Settings of Metafiles, Uninitialized, or None do not work correctly.