Engines/FlatRedBallXNA/FlatRedBall/Gui/CollapseListBox.cs
/// <summary>
/// Detaches the item from the CollapseListBox.
/// </summary>
/// <remarks>
/// This method will keep all children of the detached item in tact so that the item can simply
/// be reattached again.
/// </remarks>
/// <param name="itemToRemove"></param>
/// <returns></returns>
Detaches the item from the CollapseListBox.
Detaches the item from the CollapseListBox .
public CollapseItem DetachItem(string itemToRemove)
        {
            CollapseItem tempItem = GetItemByName(itemToRemove);
            if (tempItem.parentItem != null)
            {
                tempItem.parentItem.mItems.Remove(tempItem);
                tempItem.parentItem.FixCollapseIcon();
            }
            else
                this.Items.Remove(tempItem);
            int numOfCollapsedItems = GetNumCollapsed();
            if (mStartAt + mScaleY - 1 > numOfCollapsedItems) mStartAt = numOfCollapsedItems - (int)(mScaleY - 1);
            if (mStartAt < 0) mStartAt = 0;
            AdjustScrollSize();
            return tempItem;
        }
public CollapseItem DetachItem ( string itemToRemove ) { CollapseItem tempItem = GetItemByName ( itemToRemove ) ; if ( tempItem . parentItem != null ) { tempItem . parentItem . mItems . Remove ( tempItem ) ; tempItem . parentItem . FixCollapseIcon ( ) ; } else this . Items . Remove ( tempItem ) ; int numOfCollapsedItems = GetNumCollapsed ( ) ; if ( mStartAt + mScaleY - 1 > numOfCollapsedItems ) mStartAt = numOfCollapsedItems - ( int ) ( mScaleY - 1 ) ; if ( mStartAt < 0 ) mStartAt = 0 ; AdjustScrollSize ( ) ; return tempItem ; }
Detaches the item from the CollapseListBox.
Detaches the item from the CollapseListBox .
None
itemToRemove
string
None
remarks
This method will keep all children of the detached item in tact so that the item can simply
be reattached again.
This method will keep all children of the detached item in tact so that the item can simply be reattached again .