How to insert (not append) GroupEnd and GroupStart

Last post 06-02-2005, 1:30 PM by aaauuummmm. 1 replies.
Sort Posts: Previous Next
  •  06-01-2005, 3:25 AM 7150

    How to insert (not append) GroupEnd and GroupStart

    I could only find a way to append groupend and start, so I appended and then moved to pos... (see below)
    Is this appropriate or is there a better way?  Also, should I expect my tool bars to wrap at the groupend markers or are the markers just there for aesthetics?


                Editor1.AddToolbarGroupEnd();
                Editor1.AddToolbarGroupStart();
                int count = Editor1.ToolControls.Count-1;
                CuteEditor.ToolControl tool = Editor1.ToolControls[count--];
                Editor1.ToolControls.Insert(pos,tool);
                tool = Editor1.ToolControls[count--];
                Editor1.ToolControls.Insert(pos,tool);
  •  06-02-2005, 1:30 PM 7180 in reply to 7150

    Re: How to insert (not append) GroupEnd and GroupStart

    Although this does "copy" the GroupEnd and Start to the new position, I can't figure out how to delete them at the old position.  The following with the added RemoveAt does not work.

    Help!

                //add GroupEnd
                Editor1.AddToolbarGroupEnd();
                Editor1.AddToolbarGroupStart();
                int count = Editor1.ToolControls.Count-1;
                CuteEditor.ToolControl tool = Editor1.ToolControls[count];
                Editor1.ToolControls.Insert(pos,tool);

                Editor1.ToolControls.RemoveAt(count);

                tool = Editor1.ToolControls[--count];
                Editor1.ToolControls.Insert(pos,tool);

                Editor1.ToolControls.RemoveAt(count);

View as RSS news feed in XML