Udostępnij za pośrednictwem


IVsTaskItem.IsReadOnly(VSTASKFIELD, Int32) Method

Definition

Determines whether a specified task field is set to read-only status.

public:
 int IsReadOnly(Microsoft::VisualStudio::Shell::Interop::VSTASKFIELD field, [Runtime::InteropServices::Out] int % pfReadOnly);
int IsReadOnly(Microsoft::VisualStudio::Shell::Interop::VSTASKFIELD field, [Runtime::InteropServices::Out] int & pfReadOnly);
public int IsReadOnly (Microsoft.VisualStudio.Shell.Interop.VSTASKFIELD field, out int pfReadOnly);
abstract member IsReadOnly : Microsoft.VisualStudio.Shell.Interop.VSTASKFIELD * int -> int
Public Function IsReadOnly (field As VSTASKFIELD, ByRef pfReadOnly As Integer) As Integer

Parameters

field
VSTASKFIELD

[in] Task field of which to check read-only status. For a list of field values, see VSTASKFIELD.

pfReadOnly
Int32

[out, retval] If true, then the task field is read-only. If false, then the task field can be edited by the user.

Returns

If the method succeeds, it returns S_OK. If it fails, it returns an error code.

Remarks

COM Signature

From vsshell.idl:

HRESULT IVsTaskItem::IsReadOnly(  
   [in] VSTASKFIELD field,  
   [out, retval]BOOL *pfReadOnly  
);  

If the pfReadOnly parameter is set to false, then the user can edit the specified field and the task list uses the appropriate put method to update the task's information for that field. For example, if the priority field is set to read-write, then the task list uses the put_Priority method to set this field.

Applies to