473,516 Members | 2,771 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Text Auto-completion

Hi All,

I am developing an xml editor, inwhich I want to include text
auto-completion.
When I finish entering start element (ie.<Hello>) on rich text box,
the end element (ie.</Hello>) should be entered automatically and also
the cursor is automatically positioned in between the start element
and end element(ie.<Hello>|</Hello>). How should I do this using C#
for Windows environment?

Thanx in advance.

Regards,
Riath
Nov 16 '05 #1
1 1770
Riath,

Off the top of my head, you'll need to monitoring changes to the edit box,
checking for ">".
At that point, you should back trace to see if there is a "<" close by (make
sure you know and apply the rules for XML node naming).
If one is found, get the cursor location, and then copy all the text between
the tags, pad with your "</" and ">" and insert the text.
You can then use the cursor location you stored to apply to the text box.

All these operations should be possible with TextBox properties and methods.

Good luck!

Dan.

"Roshan" <km*****@vsnl.com> wrote in message
news:e5**************************@posting.google.c om...
Hi All,

I am developing an xml editor, inwhich I want to include text
auto-completion.
When I finish entering start element (ie.<Hello>) on rich text box,
the end element (ie.</Hello>) should be entered automatically and also
the cursor is automatically positioned in between the start element
and end element(ie.<Hello>|</Hello>). How should I do this using C#
for Windows environment?

Thanx in advance.

Regards,
Riath

Nov 16 '05 #2

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

Similar topics

11
8090
by: alex | last post by:
Hi, I am looking for a way to populate an HTML table from an external local text file which looks like this: DATE/TIME LAT. LON. DEPTH. ML. -------------------- ---------- ---------- ------- ------- 21/03/2005-04:06:03 XX,XX XX,XX 171 3,42 21/03/2005-12:23:53 XX,XX ...
17
27844
by: Piers Lawson | last post by:
If the following is displayed in IE6 or FireFox, the text box forces the second DIV to expand beyond its 15em width. Is there a way to have the text box fit within the DIV (preferably without losing its default borders)? Thank you in advance Piers <!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Strict//EN'...
11
5218
by: Mark Schneider | last post by:
I'm trying to avoid using <table> for formatting purposes where other, reasonable means exist. I'm stuck trying to find a way to find an equivalent for the code below. <table align="center"> <tr> <td>abc</td> </tr> </table>
4
2877
by: sweep | last post by:
Hi there, I have a problem with some CSS I'm writing and I was looking for a little help. I have a nav bar at the top and left side of my page in CSS which work fine. The remaining space has a div which I'm using for body text. Floated to the right of this are two image boxes and a broken out quotation from the page (this box is wider than...
4
2581
by: Shark | last post by:
Hi, I have the following code: <div id="navAlpha"><div id="mainImage"><img src="/All/10001/main.jpg"></div> <div id="mainInfo"> // a list apart's mountain top <dl id="red"><dt>nick: astronomer</dt><dd> R: 800</dd><dd> P: 875</dd></dl></div> <div style='clear: both;'>&nbsp;</div></div>
2
3638
by: Graeme | last post by:
Hi there Yet another daft question. Can I fill a css defined box with a text character such that the box can be set to say, 85% page width, and the text character fills the bos to that width, does not overflow? Graeme
2
2457
by: vinit_mahajan99 | last post by:
Hello all, I want to align the images and controls at the bottom of a master page or at the right side. I tried to do it with the table but I was not successful. The image should be seen at the bottom of the page. Please reply....
2
7043
by: GloStix | last post by:
For some reason, FF likes to put a black underline on all my buttons. No matter what I do, it has the line I've tried displaying as block and cursor, anything.. Also I've been trying to get it so the entire block is clickable, not just the text. I've sorta got it so it's clickable, just some parts of the button I still can't click on. The...
13
3267
by: Stevo | last post by:
I've found that for IE6+, if you add the property text-align:center to a DIV, then *anything* inside it gets centered. That can be a table, an object/embed, another DIV, an image, or some text. Firefox and Safari on the other hand don't treat text-align in that way. In my tests on those browsers, they only centers images and text. Any DIVs,...
8
5086
by: Sham | last post by:
I am trying to perform the following query on a table that has been indexed using Full Text Search. The table contains multiple columns than have been indexed. (Below, all xml columns are indexed). dbo.maintable(ProfileID int pk) dbo.fts_table(ProfileID int pk fk, col1 xml, col2 xml, col3 xml) I want to perform a query that will return...
0
7276
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...
0
7182
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...
0
7408
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
7548
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...
1
5110
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...
0
4773
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...
0
3267
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...
0
3259
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1624
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

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.