|
-
Dec 3rd, 2002, 02:10 AM
#1
Thread Starter
Member
Formattable Textbox
Hi All,
I need to create a textbox control that can have other objects embedded into it (Ie. Images). These objects need to be inserted into the flow of text. I can't see how to do it with a control inherited from a text box control. I also need to do text formatting, bulleting, TABS, numbering and paragraph styles.
Is it possible to inherit from TextBoxBase?
Thanks in advance.
Alan Liddle
-
Dec 3rd, 2002, 02:19 AM
#2
Member
A TextBox can't contain other Objects. Panels are the only Objects that can contain other Objects. Well, I suppose I could be wrong but at least that's how I understand it. 
The only way I can think of this is to use a Panel. You'll have to actually draw the text using e.Graphics.DrawString in the Panels Paint event though.
-
Dec 3rd, 2002, 03:05 AM
#3
Registered User
That is a slite understatement..... Forms, Groupboxes, Toolbars and some other objects can contain other objects. There is also a possability to implement the IContainer interface for a Home-made control to create container features.
-
Dec 3rd, 2002, 03:13 AM
#4
Member
Hmm. Yeah. It's late, I just don't know what I type sometimes..
-
Dec 3rd, 2002, 03:16 AM
#5
Registered User
Hehe, I know the feeling..... It's morning here and I just had my morning coffee, so I'm still alert....
-
Dec 3rd, 2002, 04:02 AM
#6
Also a richtextbox can hold images and things of that nature.
-
Dec 3rd, 2002, 12:10 PM
#7
Member
No kiddin? I didn't know that, LOL.
-
Dec 9th, 2002, 07:40 PM
#8
Thread Starter
Member
Can a RichTextBox really contain images? Can they contain other objects?
Alan
-
Dec 9th, 2002, 07:49 PM
#9
Yes. RTF is pretty much the same format that WORD uses. Although I'm not sure how you do tables. Images are no problem, you can use the RichTextBox's Paste method.
Yup I just tested tables too. Although I'm not sure the RTF code to make one, but you can copy one in so they can contain it.
-
Dec 10th, 2002, 08:01 AM
#10
Hyperactive Member
Is it possible, when writing in a richtextbox, to be able to select an image using a filedialog and have it inserted into the text where the cursor is without cutting and pasting? (a sort of insert clipart)
-
Dec 10th, 2002, 11:18 AM
#11
Probably not, but you do the cutting and pasting in the code so the user doesn't see or do that part. You can also reset the clipboard with what it had before so they don't lose their own things they had in there.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|