Idea behind a custom text editor...

N

Natan Vivo

Hi everybody!

I am planning to create a kind of text editor that you can insert
objects in the middle of the text, much like you insert WordArt or
vector graphics inside a MS Word document. You can drag them, align
with the text and etc. When you double click those objects, you enter
another editor specific for that kind of object, like cliparts on ms
word.

I don't want a complete tutorial about how to create this kind of
thing, only some idea about how to start or how this thing works.

I was planning to create some controls based on
System.Windows.Form.Control to be those objects, but i don't know if
this is the right way. An object to be the "paper" behind the text,
then other objects to be inserted in this container... But i think
that like the name says, those kind of objects are to be used in
windows forms like user controls, not objects inside a custom editor.
So, where should i start?

Anyone can help me with the concept behind this kind of thing? Any
book or site to look for? I thought about looking the OpenOffice
source, but maybe there is a better place to look.

Any idea or help would be great!

Thank you.
 
P

Paul E Collins

Natan Vivo said:
I am planning to create a kind of text editor
that you can insert objects in the middle of
the text [...] When you double click those objects,
you enter another editor specific for that kind of
object, like cliparts on ms word.

You can basically do this with the RichTextBox control.

Bitmap bmp = new Bitmap(@"c:\test.bmp");
Clipboard.SetDataObject(bmp);
myRichTextBox.Paste();

P.
 
N

Natan Vivo

Paul E Collins said:
You can basically do this with the RichTextBox control.

Bitmap bmp = new Bitmap(@"c:\test.bmp");
Clipboard.SetDataObject(bmp);
myRichTextBox.Paste();

No, you didn't understand... I don't want insert pictures inside this
editor. I want to insert objects that i create in a format that i
design. A rich text box is far from what i want...

Imagine it more like a Corel Draw Page, or a MS Word page with WordArt
objects. Except that the objects i will create with GDI+, they don't
exist. I must create the workspace and the objects and design a way to
work with them inside this workspace.

i just need the idea or some program that works like that.. like a
vector drawing app in c#... this would be helpful.
 
P

Paul E Collins

Natan Vivo said:
No, you didn't understand... I don't want insert
pictures inside this editor. I want to insert objects
that i create in a format that i design. A rich text
box is far from what i want...

You can put more than just pictures in a RichTextBox. It supports any kind
of object that supports OLE (object linking and embedding).

Perhaps you should consider creating your objects in an OLE-compatible
format (so that they could also be included in Word documents, Excel
documents, and so on) instead of trying to re-invent the OLE concept
yourself.

Unfortunately, I don't know how to achieve this in C#. Anyone else?

P.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top