Items and Sub Items in RichView!

General TRichView support forum. Please post your questions here
Post Reply
mamouri
Posts: 63
Joined: Sat Aug 19, 2006 5:06 am

Items and Sub Items in RichView!

Post by mamouri »

Hi
I have a questions about items in richview. Assume following scenario:

1. User paste following text in richviewEDIT
Borland Developer Studio is an integrated development environment (IDE) for building Delphi, Delphi for .NET, C#, and C++ applications. The Borland Developer Studio IDE provides a comprehensive set of tools that streamline and simplify the development life cycle.
2. Then he select "The Borland Developer Studio IDE" and Change the style using ApplyTextStyles.

3. Then he select Borland and change the style again using ApplyTextStyle (to anothor style)

4. Now there are 5 items in RichView:
A. Borland Developer Studio is an integrated development environment (IDE) for building Delphi, Delphi for .NET, C#, and C++ applications. -> Style: Normal Text
B. The -> Style #1
C. Borland -> Style #2
D. Developer Studio IDE -> Style #1
E. provides a comprehensive set of tools that streamline and simplify the development life cycle. -> Style: Normal Text


I want to change this behavior in RichView. I need get following Items:
A. Borland Developer Studio is an integrated development environment (IDE) for building Delphi, Delphi for .NET, C#, and C++ applications. -> Style: Normal Text
B. The Borland Developer Studio IDE -> Style #1
C. Borland -> Style #2
E. provides a comprehensive set of tools that streamline and simplify the development life cycle. -> Style: Normal Text

Is it possible?

Sorry for my bad english
mamouri
Posts: 63
Joined: Sat Aug 19, 2006 5:06 am

Post by mamouri »

In fact I want implement a special kind of formatting.
User should able to select part of text and make it poem, quotation, keyword, etc.
It's possible that user select a sentence and make it poem and then select a word in the poem and make it keyword.
Finally I want get all items texts and insert them in my "Format" table so then I can show a list of formats to the user and he can choose every format and view it's associated story.

I hop it clear what I want to do.
Thank you
Sergey Tkachenko
Site Admin
Posts: 17559
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post by Sergey Tkachenko »

Sorry, items are sequential and cannot be nested.
Use another way for grouping items (style names, tag, or checkpoints)
mamouri
Posts: 63
Joined: Sat Aug 19, 2006 5:06 am

Can you please explain more?

Post by mamouri »

Hi
Can you please explain more? How checkpoints used for this purpose?
Only brief description would be enough and appropriated.

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

Post by Sergey Tkachenko »

Well, I think that using tags is more appropriate here than using checkpoints.
mamouri
Posts: 63
Joined: Sat Aug 19, 2006 5:06 am

I'm still confused!

Post by mamouri »

Hi!

I'm still confused with your solution. Let's assume I set tag of every format to an equivalent number so I can later gather items and read their number and write them to the storage.

here is an Example
The Borland Developer Studio IDE provides
@---|-------|-----------------------------------@
Phrases between @ has tag 1 and phrase | has tag 2. Now still the main problem remains. When I loop to get items to find each item tags I still faced with 3 items. "The", "Borland" and "Developer Studio IDE providers".

I need a way to get "The Borland Developer Studio IDE providers" phrase with tag 1 and "Borland" phrase with tag 2.

In fact USING TAG mean splitting a phrase to MULTIPLE ITEMS. When a phrase converted to multiple items i could not get the main and sub formats.

Can you please explain your solution more to fit this situation.

Thanx
adwilson
Posts: 45
Joined: Fri Sep 02, 2005 2:05 am
Location: Rio de Janeiro, Brazil

Post by adwilson »

Insert "The Borland Developer Studio IDE provides" with tag=1 when user do something with the text that splits it in two,
RichView automatically copys the original tag to the new items.
So in the end, doesn't matter in how many items your original item was divided because all of them will heve tag=1
Sergey Tkachenko
Site Admin
Posts: 17559
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post by Sergey Tkachenko »

You can use string tags and mark phrases using unuqie id (user-defined or auto-generated).
For example,
text: 'The ', tag 'BDS',
text 'Borland', tag 'BDS|Borland',
' Developer Studio IDE provides', tag 'BDS'.
Then, analysing tags of adjacent items, you can restore the hierarchy.
Post Reply