473,624 Members | 2,637 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

RichTextBox Control and Tables


I'd like to programatically create a "table" with columns and rows
inside the richtextbox control and save the table as a file in RTF
format. Does anyone have any examples of this?

so i want a "books" column, and a "categories " column, and I want to
have multiple rows of information written to the control and saved in
RTF. when anyone opens up the RTF file, they'll see columns and rows of
books and categories. I'd also like to format the table, if possible.
*** Sent via Developersdex http://www.developersdex.com ***
Nov 21 '05 #1
1 6427

Larry wrote:
I'd like to programatically create a "table" with columns and rows
inside the richtextbox control and save the table as a file in RTF
format. Does anyone have any examples of this?

so i want a "books" column, and a "categories " column, and I want to
have multiple rows of information written to the control and saved in
RTF. when anyone opens up the RTF file, they'll see columns and rows of
books and categories. I'd also like to format the table, if possible.


Hi Larry :)

The complete RTF specification is a free download from Microsoft BUT
it's a huge document and (like most specifications) not much fun to
read. What I generally do when I want to work out how to do something
in RTF is this: Create a minimal document in Word or (preferably)
WordPad that contains the desired feature, save it as RTF, and examine
the resulting file with Notepad.

I can't work out how to create tables in Wordpad, so I created a table
in a Word doc, saved it as RTF, then opened it and saved it with
Wordpad (this serves to strip away much of the fluff that Word adds).
Reading the resulting text in conjunction with the specification
produces enlightment.

Googling RTF produces <http://www.biblioscape .com/rtf15_spec.htm> as
the first result, which looks readable enough.

--
Larry Lard
Replies to group please

Nov 21 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
2573
by: vanvee | last post by:
Hi I have a user control that contains a RichTextBox in vb.net. In my program, I create multiple instances of this control (with the RichTextBox being in each one), that appear one above the other on a panel. The problem is that each control may have varying amounts of data, and so each RichTextBox (within each control) needs to size to fit the amount of text within that RichTextBox. I've tried multiplying the size of a single line...
0
4550
by: JMe9ka | last post by:
I'm looking to export data from my application into a document. The data represented needs to be shown in a table (like a table within a Word document). I am currently using Word automation to push data into tables within a Word document, however I would like to move away from the Word dependency this creates. Is there a good way to go about creating tables in a RichTextBox control? I had thought that this would involve creating the...
2
4860
by: Reinhard Vornholt | last post by:
Hi, I have problems with the Windows.Forms.RichtextBox Control of the VS. I have a text that is written with WordPad. In this text there are tables. The cells in the tables are holding multiple lines. When I copy & paste the whole text, including the table, the table does not show up properly in the richtextbox control. The cells are only single line. The text in the cells does not wrap. The text in the cells actually leaves the cell. ...
1
2486
by: Nathan Carroll | last post by:
In an mdi environment I constructed a child for with a richtextbox control that is used to load .rtf's. This works fine on the intiatial load of the form but when for is closed and reopened later I get: System.ObjectDisposedException: Cannot access a disposed object named "RichTextBox". Object name: "RichTextBox". at System.Windows.Forms.Control.CreateHandle() at System.Windows.Forms.TextBoxBase.CreateHandle() at...
1
1371
by: thomasp | last post by:
Using VB2005 I am trying to display a .rft file in a richtextbox control. The file contains an table and some other text. The file opens without a problem in MS Word, but when I display it in the richtextbox control, the text in the table is not in the correct columns. The text is shifted to the right and extends outside the table. Any Ideas Also, can the PrintPreview control be used to view the .rtf file? I have several reports...
9
4859
by: James Wong | last post by:
Hi, I use the RichTextBox in my program. It will use different language in this RichTextBox (chinese and english characters), and it set the "DualFont" and use different fonts. By the way, how can I print out this content to printer easily? Thanks! James
3
7171
by: michael sorens | last post by:
The documentation for the RichTextBox is sketchy at best. I want to do a very simple task but I cannot find information on this. I am using a RichTextBox as an output window. Some text I want to just add plain (e.g.. rtf.Text += "new stuff..."; ) but some text, when added, I want to be in a different color or font size. Find() will not work because the text will vary. I have delimiters on it so I could recognize it with a regular ...
4
13433
by: =?Utf-8?B?UmF5IE1pdGNoZWxs?= | last post by:
Hello, I have a multiline RichTextBox that I use for data logging. I'm concerned about how the AppendText method reacts when over time the maximum number of characters have been added. Do the oldest characters it contains start rolling off the top into the bit bucket, does it simply start silently ignoring appends until some characters, are deleted, or does some kind of exception get thrown? I've heard numerous opinions on what the...
1
3011
by: shakti s | last post by:
hi, My aplologies if this is really a silly question. I am trying to read contents like images and tables from one rich text box and paste it into another RTF control(i.e. another Richtextbox). when i am doing this...the rtf encoding is getting displayed in the destination RichTextBox. i think i am missing out something there.
0
8251
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8182
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8635
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8352
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
6115
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4085
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4188
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2614
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1800
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.