473,626 Members | 3,093 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Enable Fields in RichTextBox

I want use a RichTextBox to allow users to edit and
modify complex report.
I need to insert at runtime many optional fields wich
comes from a database.
I have think "well I will use the rtf command \field !"
but this command does work correctly.
If you load one file wich contains \field commands like
described in rtf syntax, the RichTextBox
delete theses commands and replace it whith the default
values
AND I did not can edit the fields !

NOT : All versions of the RichEdit Control from Microsoft
run like that (in previous versions of VB or VC++)

To reproduce it, insert RichTextBox, implement Load
function to load the File,
implement one function to get the Rtf code in the control
after the Load.

Sample of rtf file :
{\rtf1\ansi\ans icpg1252\deff0\ deflang1036{\fo nttbl{\f0
\fnil\fcharset0 Microsoft Sans Serif;}}
\viewkind4\uc1\ pard\f0\fs17 Test of field in RTF
controls\par
The two next lines contains two field like in MDSN rtf
definition\par
{\field {\*\fldinst AUTHOR \\*MERGEFORMAT }{\fldrslt Joe
Smith}}\par
{\field{\*\fldi nst time \\@ "h:mm AM/PM"}{\fldrslt 8:12
AM}}\par
End of fields\par
end of text\par
\par
}

Does anibody have a solution to enable the \field in the
control !?
Thank's

Jul 21 '05 #1
0 1470

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

Similar topics

0
3228
by: nouno | last post by:
I am trying to spell check a richtextbox. Through code (shown below) I save the contents of the richtextbox to a rtf file, open the rtf file in Word, spell check it, save it, and then load the ftf file back into the ricktextbox using loadfile. The problem is that the richtextbox seems to remain bound to the rtf file. If I make a change in the richtextbox after spell checking, the changes are successfully saved to the database but if the...
0
1379
by: nuwankkumara | last post by:
hai all, i am using RichTextBox as my editor , there i can't perform undo and redo when i have changed the color and font of the text as below: richBox.SelectionStart = index; richBox.SelectionLength = token.Length; richBox.SelectionColor = Color.Black; richBox.SelectionFont = regFont;
2
17328
by: JonnyT | last post by:
I searched high and low for an answer on how to auto scroll a richtextbox and now I finally have it. Since it took me a while to get a good efficient way of doing it that didn't require focus to the control or the scrolltocaret method I decided that it would be worth posting to anyone who might have similar concerns. For the record this works well in an environment where you cannot have focus going to the richtextbox....such as a chat...
0
275
by: Bertrand P. | last post by:
I want use a RichTextBox to allow users to edit and modify complex report. I need to insert at runtime many optional fields wich comes from a database. I have think "well I will use the rtf command \field !" but this command does work correctly. If you load one file wich contains \field commands like described in rtf syntax, the RichTextBox delete theses commands and replace it whith the default values
0
11139
by: Vincent | last post by:
Dear all, I have implemented a class to export the content of RichTextBox to image in WYSISYG mode so that line breaks on the screen are the same as exported. C# Code: public struct STRUCT_RECT
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 ...
0
2051
by: Vimalathithan | last post by:
I just developing a editor. I have provide the options like Bold, Italic, underlin, font change, font size change. These font options are keep in with one toolstripbutton. the toolstripbar keep inside with panel. The RichTextBox keep inside with other panel. The panel height and width is same with RichTextBox. The RichTextBox both scrolling options are make it as false. I done the coding for RichTextBox's height to fit with...
5
3006
by: Dan Tallent | last post by:
I have a scenerio when my forms are first opened that the user cannot modify the data. The fields are disabled to prevent them from modifying any of the data. If a user wishes to modify the data he would be required to click a "Edit" button which will test permissions or status information of the record. If the application determines it is ok for the user to modify the data, it enables the fields where the user now can make changes as...
0
8259
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
8192
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,...
1
8358
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,...
0
8502
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7188
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6119
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
5571
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4090
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...
1
1805
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.