Windows Vista Forums
Vista Forums Home Join Vista Forums Windows 7 Forum Vista Tutorials Tags
Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks.

Go Back   Vista Forums > Misc Newsgroups > Avalon

Vista - Element in a RichTextBox

 
 
Old 07-11-2006   #1 (permalink)
=?Utf-8?B?RHVxdWUgVmllaXJh?=


 
 

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=?=


 
 

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?=


 
 

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=?=


 
 

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


 
 

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=?=


 
 

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
 

Thread Tools


Similar Threads
Thread Forum
printing Richtextbox .NET General
WPF RichTextBox control .NET General


Vista Forums 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 Ltd

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