[Demos] Expanding-collapsing

Demos, code samples. Only questions related to the existing topics are allowed here.
Post Reply
Sergey Tkachenko
Site Admin
Posts: 13149
Joined: Sat Aug 27, 2005 10:28 am
Contact:

[Demos] Expanding-collapsing

Post by Sergey Tkachenko » Tue Sep 06, 2005 5:37 pm

This demo hides/shows certain paragraphs when user clicks hyperlinks
Image
http://www.trichview.com/support/files/collapsible.zip

Multilevel collapsible paragraphs

In addition to collapsible.zip , we've created a new demo:
Image
http://www.trichview.com/support/files/ ... psible.zip

The previous demo shows/hides paragraph between the heading paragraphs.
This demo has multilevel numbered paragraphs, and higher level paragraph hides/shows deeper paragraphs.

Numbering is implemented by LabelItem type. It's possible to use "real"
numbering, but "real" numbering cannot have plus/minus pictures before it.

Multilevel collapsible paragraphs - 2

And one more demo on the same topic:
Image
http://www.trichview.com/support/files/ ... sible2.zip

It's visually like the previous one, but plus/minus pictures are after numbering.
This demo uses real (autocalculated) paragraph numbering, so it does not
need labelitems and special paragraph styles.

Expand/collapse using hidden text

http://www.trichview.com/support/files/ ... entext.zip

Visually, this demo is like the first one.
But unlike all the demos above, it does not need a second TRichView containing a full document.
Instead of deleting collapsed paragraphs, this demo hides them.

See also:
- contact list demo with collapsible user groups http://www.trichview.com/forums/viewtopic.php?p=12608

Updates:
2008-May-14: for compatibility with TRichView 10+.
2008-Dec-9: for compatibility with TRichView 11+
2011-Oct-1: for compatibility with TRichView 13.4+
2013-Jun-28: new demo, made using a "hidden text" feature
Last edited by Sergey Tkachenko on Fri Jun 28, 2013 6:44 pm, edited 2 times in total.

miwan
Posts: 26
Joined: Tue Nov 01, 2011 8:30 pm

Post by miwan » Sat Feb 25, 2012 7:57 pm

this is beautiful

very strong

thank you

miwan.

Martian
Posts: 79
Joined: Sun Apr 03, 2011 7:32 pm

Post by Martian » Wed May 29, 2013 9:13 am

Is there a way to do it without a full copy of the document? As it's not good for big docs.
There is an option to hide/show selected text in rvActionsDemo (buggy), maybe we can use it instead?

Sergey Tkachenko
Site Admin
Posts: 13149
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post by Sergey Tkachenko » Wed May 29, 2013 9:29 am

It is possible using a hidden text, it can be shown/hidden using rvoShowHidden text in Options.
The same option used in the ActionTest demo.
There are no known bugs for this feature. If you know a bug, please explain how to reproduce it.

Martian
Posts: 79
Joined: Sun Apr 03, 2011 7:32 pm

Post by Martian » Wed May 29, 2013 7:15 pm

Sergey Tkachenko wrote:There are no known bugs for this feature. If you know a bug, please explain how to reproduce it.
There is no way to detect hidden text in your rvActions demo. You select text, press hide and it hides. After that pressing hide again does nothing.

A demo for collapse/expand with [+] sign and hidden text will be useful. Thanks.

Sergey Tkachenko
Site Admin
Posts: 13149
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post by Sergey Tkachenko » Thu May 30, 2013 1:07 pm

Hidden text becomes visible if you press "Show special characters" button (displayed as Pi-character), so you can unhide it.

I'll try to make a demo in this weekend. Actually, it is simple. All content that must be hidden when collapsing is added using "hidden text" options.
Expanding/collapsing is made by including/excluding rvoShowHiddenText (and, may be, changing +/- button)

Martian
Posts: 79
Joined: Sun Apr 03, 2011 7:32 pm

Post by Martian » Wed Jun 26, 2013 7:08 am

Is there a demo available? Using hidden property instead of additional RVE.

Sergey Tkachenko
Site Admin
Posts: 13149
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post by Sergey Tkachenko » Fri Jun 28, 2013 6:48 pm

Sorry for the delay, I created the requested demo:
http://www.trichview.com/support/files/ ... entext.zip

Of course, I was wrong by expanding/collapsing using rvoShowHiddenText option. This option could be useful if you need only "expand all" and "collapse all" commands, it cannot be used to expand/collapse only the desired parts.
The correct solution is making collapsed fragments hidden.

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest