Description
Deletes a category and the data values for that category from the category axis of a graph.
Graph controls in windows and user objects. Does not apply to graphs within DataWindow objects (because their data comes directly from the DataWindow).
Syntax
controlname.DeleteCategory ( categoryvalue )
Argument |
Description |
---|---|
controlname |
The graph in which you want to delete a category. |
categoryvalue |
A value that is the category you want to delete from controlname. The value you specify must be the same datatype as the datatype of the category axis. |
Return value
Integer.
Returns 1 if it succeeds and -1 if an error occurs. If any argument's value is null, DeleteCategory returns null.
Examples
These statements delete the category whose name is entered in the SingleLineEdit sle_delete from the graph gr_product_data:
string CategName CategName = sle_delete.Text gr_product_data.DeleteCategory(CategName)
See also
Description
Removes a category from the RibbonBar control.
Applies to
RibbonBar controls
Syntax
controlname.DeleteCategory ( Long ItemHandle )
Argument |
Description |
---|---|
controlname |
The name of the RibbonBar control. |
ItemHandle |
The handle of the category you want to delete. |
Return value
Integer.
Returns 1 if it succeeds and -1 if an error occurs. If any argument's value is null, returns null.
Usage
You can also delete an item according to the handle by using the DeleteItem function.
Examples
This example gets the category whose index number is 1 and then deletes it according to its handle.
Integer li_Return Long ll_Handle RibbonCategoryItem lr_Category ll_Handle = rbb_1.InsertCategoryLast("MyCategory") li_Return = rbb_1.GetCategoryByIndex(1,lr_Category) If li_Return = 1 Then li_Return = rbb_1.DeleteCategory(lr_Category.ItemHandle) End If
See also