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
AD
Administrator
Syncfusion Team
August 19, 2003 03:17 PM UTC
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.
AR
Amit R Chavan
August 28, 2003 02:47 AM UTC
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.
AD
Administrator
Syncfusion Team
September 2, 2003 03:33 PM UTC
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.