We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.

Expand and Collapse functionality for XML File

Thread ID:

Created:

Updated:

Platform:

Replies:

6369 Aug 11,2003 07:52 AM Sep 2,2003 11:33 AM Windows Forms 3
loading
Tags: EditControl
Amit R Chavan
Asked On August 11, 2003 07:52 AM

Hi, We are using editor control.I want to know how I can provide the expand and collapse unctionality to my XML file using Editor Control. Expand and Collapse functinality should be same as we visualize in Internate Explorer. Thank Amit

Administrator [Syncfusion]
Replied On August 19, 2003 11:17 AM

Hi Amit, The collapse/expand functionality provided by the Edit Control is designed to be similar to the VS.Net IDE. Currently only manual outlining is available. You need to set OutliningEnabled to true, and then access the functionality through the context menu. First, you need to set the following property to true: editControl1.OutliningEnabled = true; To perform the outlining, you can do the following: Build your project with OutliningEnabled set to true In the edit control, select the lines that you want to group as an outlining object. Once selected, right click and choose "Outlining -> Hide Selection" Now you can collapse/expand the outlining group. Outlining->Hide Selection invokes HideAsOutlining(). This will create an outlining object for the currently selected text, and collapse the selection. We have added an override for this which will take an EditLocationRange as a parameter. After the outlining object is created, the following methods would let you programatically expand/collapse To toggle the outlining programatically for a given line, you can call: public bool ToggleOutliningExpansion(int ln) To expand: public void ExpandOutlining(int ln) To collapse: public void CollapseOutlining(int ln) Let me know if this is the information you are looking for. Regards Guru Patwal.

Amit R Chavan
Replied On August 27, 2003 10:47 PM

Hi Guru, Thanks for your reply. I have done with the following things already it works fine.But my problem is that I want an editor who's diplay exactly behave as a MS IE. So that if it is a XML file then each node can able to expand and collapse.Can you suggest me the solution on this. Thanks and Regards Amit > Hi Amit, > > The collapse/expand functionality provided by the Edit Control is designed to be similar to the VS.Net IDE. Currently only manual outlining is available. You need to set OutliningEnabled to true, and then access the functionality through the context menu. > > First, you need to set the following property to true: > editControl1.OutliningEnabled = true; > > To perform the outlining, you can do the following: > > Build your project with OutliningEnabled set to true > > In the edit control, select the lines that you want to group as an outlining object. > > Once selected, right click and choose > "Outlining -> Hide Selection" > > Now you can collapse/expand the outlining group. > > Outlining->Hide Selection invokes HideAsOutlining(). This will create an outlining object for the currently selected text, and collapse the selection. We have added an override for this which will take an EditLocationRange as a parameter. > > After the outlining object is created, the following methods would let you programatically expand/collapse > > To toggle the outlining programatically for a given line, you can call: > public bool ToggleOutliningExpansion(int ln) > > To expand: > public void ExpandOutlining(int ln) > > To collapse: > public void CollapseOutlining(int ln) > > Let me know if this is the information you are looking for. > > Regards > Guru Patwal.

Administrator [Syncfusion]
Replied On September 2, 2003 11:33 AM

Hi Amit, We are working on the automatic outlining feature and this will be available in the new version of Essential Edit. We will inform you when this release is due. Currently only manual outlining is functional. First, you need to set the following property to true: editControl1.OutliningEnabled = true; To perform the outlining, you can do the following: Build your project with OutliningEnabled set to true In the edit control, select the lines that you want to group as an outlining object. In this case you could use open and closing of a tag as the selection range. Once selected, right click and choose "Outlining -> Hide Selection" now you can collapse/expand the outlining group. Programatically, Outlining->Hide Selection invokes HideAsOutlining() (public method of the edit control). This will create an outlining object for the currently selected text, and collapse the selection. I have added an override for this which will take an EditLocationRange as a parameter. This will be in the next release. After the outlining object is created, the following methods would let you programatically expand/collapse To toggle the outlining programatically for a given line, you can call: public bool ToggleOutliningExpansion(int ln) To expand: public void ExpandOutlining(int ln) To collapse: public void CollapseOutlining(int ln) Let me know if this helps. Regards, Guru Patwal.

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;