Windows Vista Forums
Vista Forums Home Join Vista Forums Donate Vista Tutorials Tags

Welcome to Vista Forums we are your forum to discuss Windows Vista x64 and x86 systems. Whether you need help or just want to post an idea you have on Vista, this is the forum for you.
Register at Vista forums...the world biggest Windows Vista resource Join Vista Forums Now

Go Back   Vista Forums > Microsoft Technical Newsgroups > Avalon

Element in a RichTextBox

Update your Vista Drivers Update Your Drivers Now!!
Closed Thread
 
Thread Tools Display Modes
Old 07-11-2006   #1 (permalink)
=?Utf-8?B?RHVxdWUgVmllaXJh?=
Guest


 

Element in a RichTextBox

I'm planning to use the RichTextBox as my Math editor.

For instance, if I want to insert the Squareroot of 32, I would insert a
Sqrt element and the numbers 3 and 2.
Since I want to benefit from all the editing features in a Rich Text Box, I
would like the Sqrt to be an element, just like 3 and 2 are.
Also, I want the Sqrt element to change the relative position of the 3 and
the 2 because 32 will be inside the Sqrt.
Finally, the Sqrt element representation would be the typical mathematical
symbol (the "v" with a long right arm).

Which element should I derive from to create Sqrt? From "Block"?
Where can I find more information on this?

Thanks.

--
Duque Vieira

My System SpecsSystem Spec
Old 07-12-2006   #2 (permalink)
=?Utf-8?B?dmlsaWVzY3U=?=
Guest


 

RE: Element in a RichTextBox

I don't think it's possible for an element (Sqrt) to change the relative
position of other elements (32).

I have created a math equations library for WPF (
http://www.valil.com/winfx/math.html ) - the idea is to have the basic custom
controls for the equations. You can display any equation composing this
custom controls.
I haven't create a editor using this library, it's just for displaying the
equations.
I presume an editor will be conceptually the same as the Equation editor in
Word.

--
Valentin Iliescu [MVP - Client Application Development]


"Duque Vieira" wrote:

> I'm planning to use the RichTextBox as my Math editor.
>
> For instance, if I want to insert the Squareroot of 32, I would insert a
> Sqrt element and the numbers 3 and 2.
> Since I want to benefit from all the editing features in a Rich Text Box, I
> would like the Sqrt to be an element, just like 3 and 2 are.
> Also, I want the Sqrt element to change the relative position of the 3 and
> the 2 because 32 will be inside the Sqrt.
> Finally, the Sqrt element representation would be the typical mathematical
> symbol (the "v" with a long right arm).
>
> Which element should I derive from to create Sqrt? From "Block"?
> Where can I find more information on this?
>
> Thanks.
>
> --
> Duque Vieira

My System SpecsSystem Spec
Old 07-13-2006   #3 (permalink)
=?Utf-8?B?RHVxdWUgVmllaXJh?=
Guest


 

RE: Element in a RichTextBox

Hello Viliescu and thanks for your sample code (it's very nice btw).

I think it is possible to do, becouse it would work like a Paragraph or a
List.
Both of them afect their children.

What do you think?

Best regards.

--
Duque Vieira


"viliescu" wrote:

> I don't think it's possible for an element (Sqrt) to change the relative
> position of other elements (32).
>
> I have created a math equations library for WPF (
> http://www.valil.com/winfx/math.html ) - the idea is to have the basic custom
> controls for the equations. You can display any equation composing this
> custom controls.
> I haven't create a editor using this library, it's just for displaying the
> equations.
> I presume an editor will be conceptually the same as the Equation editor in
> Word.
>
> --
> Valentin Iliescu [MVP - Client Application Development]
>
>
> "Duque Vieira" wrote:
>
> > I'm planning to use the RichTextBox as my Math editor.
> >
> > For instance, if I want to insert the Squareroot of 32, I would insert a
> > Sqrt element and the numbers 3 and 2.
> > Since I want to benefit from all the editing features in a Rich Text Box, I
> > would like the Sqrt to be an element, just like 3 and 2 are.
> > Also, I want the Sqrt element to change the relative position of the 3 and
> > the 2 because 32 will be inside the Sqrt.
> > Finally, the Sqrt element representation would be the typical mathematical
> > symbol (the "v" with a long right arm).
> >
> > Which element should I derive from to create Sqrt? From "Block"?
> > Where can I find more information on this?
> >
> > Thanks.
> >
> > --
> > Duque Vieira

My System SpecsSystem Spec
Old 07-14-2006   #4 (permalink)
=?Utf-8?B?dmlsaWVzY3U=?=
Guest


 

RE: Element in a RichTextBox

I think I misunderstood you. Yes, it is possible to do that, in fact, this is
what I did in the library. I have created custom "containers" (panels) that
arrange their children in a specific way - for example, RadicalPanel arranges
its children (the index, the radical sign and the radicand) to look like a
radical.

--
Valentin Iliescu [MVP - Client Application Development]


"Duque Vieira" wrote:

> Hello Viliescu and thanks for your sample code (it's very nice btw).
>
> I think it is possible to do, becouse it would work like a Paragraph or a
> List.
> Both of them afect their children.
>
> What do you think?
>
> Best regards.
>
> --
> Duque Vieira
>
>
> "viliescu" wrote:
>
> > I don't think it's possible for an element (Sqrt) to change the relative
> > position of other elements (32).
> >
> > I have created a math equations library for WPF (
> > http://www.valil.com/winfx/math.html ) - the idea is to have the basic custom
> > controls for the equations. You can display any equation composing this
> > custom controls.
> > I haven't create a editor using this library, it's just for displaying the
> > equations.
> > I presume an editor will be conceptually the same as the Equation editor in
> > Word.
> >
> > --
> > Valentin Iliescu [MVP - Client Application Development]
> >
> >
> > "Duque Vieira" wrote:
> >
> > > I'm planning to use the RichTextBox as my Math editor.
> > >
> > > For instance, if I want to insert the Squareroot of 32, I would insert a
> > > Sqrt element and the numbers 3 and 2.
> > > Since I want to benefit from all the editing features in a Rich Text Box, I
> > > would like the Sqrt to be an element, just like 3 and 2 are.
> > > Also, I want the Sqrt element to change the relative position of the 3 and
> > > the 2 because 32 will be inside the Sqrt.
> > > Finally, the Sqrt element representation would be the typical mathematical
> > > symbol (the "v" with a long right arm).
> > >
> > > Which element should I derive from to create Sqrt? From "Block"?
> > > Where can I find more information on this?
> > >
> > > Thanks.
> > >
> > > --
> > > Duque Vieira

My System SpecsSystem Spec
Old 07-16-2006   #5 (permalink)
Joao Paulo Duque Vieira
Guest


 

RE: Element in a RichTextBox

Hello viliescu,

I don't think you missunderstood me the first time.
In my last post, I do think I didn't give you the right idea.

I want my equation objects to work as single elements in the FlowDocument,
so that the RichBoxEditor can treat them as a single element. This way, I
may move around each element in the equation and insert or delete single
elements in between.

In a short sentence: I want to have a real equation editor where each equation
particle is a single editable element.

I'm not sure I make may self understood. I hope so.

Thanks a lot.


> I think I misunderstood you. Yes, it is possible to do that, in fact,
> this is what I did in the library. I have created custom "containers"
> (panels) that arrange their children in a specific way - for example,
> RadicalPanel arranges its children (the index, the radical sign and
> the radicand) to look like a radical.
>
> "Duque Vieira" wrote:
>
>> Hello Viliescu and thanks for your sample code (it's very nice btw).
>>
>> I think it is possible to do, becouse it would work like a Paragraph
>> or a
>> List.
>> Both of them afect their children.
>> What do you think?
>>
>> Best regards.
>>
>> -- Duque Vieira
>>
>> "viliescu" wrote:
>>
>>> I don't think it's possible for an element (Sqrt) to change the
>>> relative position of other elements (32).
>>>
>>> I have created a math equations library for WPF (
>>> http://www.valil.com/winfx/math.html ) - the idea is to have the
>>> basic custom
>>> controls for the equations. You can display any equation composing
>>> this
>>> custom controls.
>>> I haven't create a editor using this library, it's just for
>>> displaying the
>>> equations.
>>> I presume an editor will be conceptually the same as the Equation
>>> editor in
>>> Word.
>>> -- Valentin Iliescu [MVP - Client Application Development]
>>>
>>> "Duque Vieira" wrote:
>>>
>>>> I'm planning to use the RichTextBox as my Math editor.
>>>>
>>>> For instance, if I want to insert the Squareroot of 32, I would
>>>> insert a
>>>> Sqrt element and the numbers 3 and 2.
>>>> Since I want to benefit from all the editing features in a Rich
>>>> Text Box, I
>>>> would like the Sqrt to be an element, just like 3 and 2 are.
>>>> Also, I want the Sqrt element to change the relative position of
>>>> the 3 and
>>>> the 2 because 32 will be inside the Sqrt.
>>>> Finally, the Sqrt element representation would be the typical
>>>> mathematical
>>>> symbol (the "v" with a long right arm).
>>>> Which element should I derive from to create Sqrt? From "Block"?
>>>> Where can I find more information on this?
>>>>
>>>> Thanks.
>>>>
>>>> -- Duque Vieira
>>>>



My System SpecsSystem Spec
Old 07-17-2006   #6 (permalink)
=?Utf-8?B?dmlsaWVzY3U=?=
Guest


 

RE: Element in a RichTextBox

In this case, I don't think it's possible to do that. Think about the
Equation Editor from Microsoft Word: the editing of equations is separate
from the document editing, you always have to change the context. I have
thought about this problem for a while and I think Word/Eq. editor is the
optimal way to go.

Anyway, I don't want to discourage you - I might be wrong (in fact I would
love to be wrong ), so maybe somebody else has some other ideas to make it
work like you said.
--
Valentin Iliescu [MVP - Client Application Development]


"Joao Paulo Duque Vieira" wrote:

> Hello viliescu,
>
> I don't think you missunderstood me the first time.
> In my last post, I do think I didn't give you the right idea.
>
> I want my equation objects to work as single elements in the FlowDocument,
> so that the RichBoxEditor can treat them as a single element. This way, I
> may move around each element in the equation and insert or delete single
> elements in between.
>
> In a short sentence: I want to have a real equation editor where each equation
> particle is a single editable element.
>
> I'm not sure I make may self understood. I hope so.
>
> Thanks a lot.
>
>
> > I think I misunderstood you. Yes, it is possible to do that, in fact,
> > this is what I did in the library. I have created custom "containers"
> > (panels) that arrange their children in a specific way - for example,
> > RadicalPanel arranges its children (the index, the radical sign and
> > the radicand) to look like a radical.
> >
> > "Duque Vieira" wrote:
> >
> >> Hello Viliescu and thanks for your sample code (it's very nice btw).
> >>
> >> I think it is possible to do, becouse it would work like a Paragraph
> >> or a
> >> List.
> >> Both of them afect their children.
> >> What do you think?
> >>
> >> Best regards.
> >>
> >> -- Duque Vieira
> >>
> >> "viliescu" wrote:
> >>
> >>> I don't think it's possible for an element (Sqrt) to change the
> >>> relative position of other elements (32).
> >>>
> >>> I have created a math equations library for WPF (
> >>> http://www.valil.com/winfx/math.html ) - the idea is to have the
> >>> basic custom
> >>> controls for the equations. You can display any equation composing
> >>> this
> >>> custom controls.
> >>> I haven't create a editor using this library, it's just for
> >>> displaying the
> >>> equations.
> >>> I presume an editor will be conceptually the same as the Equation
> >>> editor in
> >>> Word.
> >>> -- Valentin Iliescu [MVP - Client Application Development]
> >>>
> >>> "Duque Vieira" wrote:
> >>>
> >>>> I'm planning to use the RichTextBox as my Math editor.
> >>>>
> >>>> For instance, if I want to insert the Squareroot of 32, I would
> >>>> insert a
> >>>> Sqrt element and the numbers 3 and 2.
> >>>> Since I want to benefit from all the editing features in a Rich
> >>>> Text Box, I
> >>>> would like the Sqrt to be an element, just like 3 and 2 are.
> >>>> Also, I want the Sqrt element to change the relative position of
> >>>> the 3 and
> >>>> the 2 because 32 will be inside the Sqrt.
> >>>> Finally, the Sqrt element representation would be the typical
> >>>> mathematical
> >>>> symbol (the "v" with a long right arm).
> >>>> Which element should I derive from to create Sqrt? From "Block"?
> >>>> Where can I find more information on this?
> >>>>
> >>>> Thanks.
> >>>>
> >>>> -- Duque Vieira
> >>>>

>
>
>

My System SpecsSystem Spec
Closed Thread

Thread Tools
Display Modes



Similar Threads
Thread Thread Starter Forum Replies Last Post
Copy text from RichTextBox into .txt problem Kryten PowerShell 1 08-20-2008 02:21 AM
WPF RichTextBox control Anthony Meehan .NET General 2 07-29-2008 04:07 AM
richtextbox question arnoud Avalon 0 01-20-2007 03:34 AM
RichTextBox help Timothy Avalon 0 10-28-2006 10:42 PM
RichTextBox / XPSDocuments MichaelG Avalon 1 01-10-2006 03:52 PM


Vistax64.com is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows Vista", the Start Orb, and related materials are trademarks of Microsoft Corp.
© Designer Media 2005-2008

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51