Hide Table of Contents
ReplaceCommandItem Method (IFlyoutGroup)

Replaces a command item at the specified position.

.NET Syntax

Visual Basic (Declaration) 
Function ReplaceCommandItem( _
   ByVal Position As System.Integer, _
   ByVal Name As System.String, _
   ByVal HintString As System.String, _
   ByVal ImageListIndex As System.Integer, _
   ByVal CallbackFunction As System.String, _
   ByVal UpdateCallbackFunction As System.String _
) As System.Integer
Visual Basic (Usage) 
Dim instance As IFlyoutGroup
Dim Position As System.Integer
Dim Name As System.String
Dim HintString As System.String
Dim ImageListIndex As System.Integer
Dim CallbackFunction As System.String
Dim UpdateCallbackFunction As System.String
Dim value As System.Integer
 
value = instance.ReplaceCommandItem(Position, Name, HintString, ImageListIndex, CallbackFunction, UpdateCallbackFunction)
C# 
System.int ReplaceCommandItem( 
   System.int Position,
   System.string Name,
   System.string HintString,
   System.int ImageListIndex,
   System.string CallbackFunction,
   System.string UpdateCallbackFunction
)
C++/CLI 
System.int ReplaceCommandItem( 
&   System.int Position,
&   System.String^ Name,
&   System.String^ HintString,
&   System.int ImageListIndex,
&   System.String^ CallbackFunction,
&   System.String^ UpdateCallbackFunction
) 

Parameters

Position

0-based index of the item to replace in the flyout

Name
Name of the item to add to the flyout
HintString
Text displayed in the SOLIDWORKS status bar when the pointer is on the item
ImageListIndex
Index of the image in the icon list assigned to the parent flyout (see Remarks)
CallbackFunction

Function to call when this item is selected

UpdateCallbackFunction
Optional function that controls the state of the item; if specified, then SOLIDWORKS calls this function before displaying the item

If your method returns...

 

Then the SOLIDWORKS software...

0

Deselects and disables the item

1

Deselects and enables the item; this is the default state if no update function is specified

2

Selects and disables the item

3

Selects and enables the item

4

Hides the item

Remarks

ImageListIndex is 0-based. The size of the index is equal to the number of images in the large or small graphic file for that flyout. See IFlyoutGroup::LargeIconList and IFlyoutGroup::SmallIconList for details.

 

You can use -1 for ImageListIndex to specify that no icon is needed.

 

See Also

Availability

SOLIDWORKS 2011 FCS, Revision Number 19.0


Provide feedback on this topic

SOLIDWORKS welcomes your feedback concerning the presentation, accuracy, and thoroughness of the documentation. Use the form below to send your comments and suggestions about this topic directly to our documentation team. The documentation team cannot answer technical support questions. Click here for information about technical support.

* Required

 
*Email:  
Subject:   Feedback on Help Topics
Page:   ReplaceCommandItem Method (IFlyoutGroup)
*Comment:  
*   I acknowledge I have read and I hereby accept the privacy policy under which my Personal Data will be used by Dassault Systèmes

Print Topic

Select the scope of content to print:

x

We have detected you are using a browser version older than Internet Explorer 7. For optimized display, we suggest upgrading your browser to Internet Explorer 7 or newer.

 Never show this message again
x

Web Help Content Version: API Help (English only) 2015 SP05

To disable Web help from within SOLIDWORKS and use local help instead, click Help > Use SOLIDWORKS Web Help.

To report problems encountered with the Web help interface and search, contact your local support representative. To provide feedback on individual help topics, use the “Feedback on this topic” link on the individual topic page.