I need to write my own custom text edit control.. but I'm not sure where to
start - I've never written a custom control... the features I want are
somewhat similar to the VS .Net text editor - text colouring, collapsible
regions etc... I haven't been able to find anything that could achieve that
which is free...
So what is the suggested starting point? Can I make some kind of control
that derives from a RichEdit box and write my own paint methods? Should I
build a completely custom user control? Any suggestions, or pointers to
example source code of similar controls would be appreciated! 3 11882
You cannot go beyond this control's functionality http://www.freetextbox.com/
Tweak the source code as per your needs..
Sudhakar Sadasivuni[MVP] http://weblogs.asp.net/ssadasivuni http://www.mugh.net
"Nick Haines" wrote: I need to write my own custom text edit control.. but I'm not sure where to start - I've never written a custom control... the features I want are somewhat similar to the VS .Net text editor - text colouring, collapsible regions etc... I haven't been able to find anything that could achieve that which is free...
So what is the suggested starting point? Can I make some kind of control that derives from a RichEdit box and write my own paint methods? Should I build a completely custom user control? Any suggestions, or pointers to example source code of similar controls would be appreciated!
It's not that simple to write a text editor like VS.
Basically, you'll have to implement your very own text buffer and position
tracking system. This should also be able to break big blobs of text into
manageable chunks/entities like lines, words, etc.
You could do all that or you can over-ride RichTextBox and do some clever
tricks with KeyDown/KeyPress and TextChanged events to parse the word which
is currently being edited and set its color, etc. But you'll soon find out
this is not a very good approach..
-vJ
"Nick Haines" <nh> wrote in message
news:%2******** ********@tk2msf tngp13.phx.gbl. .. I need to write my own custom text edit control.. but I'm not sure where
to start - I've never written a custom control... the features I want are somewhat similar to the VS .Net text editor - text colouring, collapsible regions etc... I haven't been able to find anything that could achieve
that which is free...
So what is the suggested starting point? Can I make some kind of control that derives from a RichEdit box and write my own paint methods? Should I build a completely custom user control? Any suggestions, or pointers to example source code of similar controls would be appreciated!
You might want to check out SharpDevelop. It's an open source IDE
written in C#. You might be able to glean some information from looking
at how their editor component is implemented. http://www.icsharpcode.net/OpenSource/SD/
The book they advertise on their site provides some good explanations of
how the code works, including an extended discussion of different
approaches to writing text editors. I spent an afternoon reading through
it at Borders and found it quite interesting.
-Jason
Nick Haines wrote: I need to write my own custom text edit control.. but I'm not sure where to start - I've never written a custom control... the features I want are somewhat similar to the VS .Net text editor - text colouring, collapsible regions etc... I haven't been able to find anything that could achieve that which is free...
So what is the suggested starting point? Can I make some kind of control that derives from a RichEdit box and write my own paint methods? Should I build a completely custom user control? Any suggestions, or pointers to example source code of similar controls would be appreciated!
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: SammyBar |
last post by:
Hi,
I'm trying to bind a custom collection class to a data grid, following the
guidelines from the article
http://msdn.microsoft.com/msdnmag/issues/05/08/CollectionsandDataBinding/default.aspx.
The problem is the article is in VisualBasic. I already get the collection
to be recognized as a Data Source by the IDE. It populated the DataGrid
correctly from the fields on the items object of the collection, but I can't
get the DataGrid to...
|
by: NewBob |
last post by:
Since Access automatically highlights all of the text in a text
control (I use it to hold data from a memo field) when the control is
activated, I've added the following code to put the cursor at the end.
Private Sub txtCapability_GotFocus()
‘ Placed either behind the OnEnter or GotFocus Event of a control
named,
' in this case, txtCapability, on a form ensures that when the control
is
|
by: Dot net work |
last post by:
Hello.
If I use an asp.net custom validator control to validate a textbox,
what I find is that if I enter in some text that I have already
entered and validated in a previous session (you know when you start
typing inside a textbox, you see things that have already been typed
before), then when I click off the textbox, the custom validator
client side jscript does not run. I really need the custom jscript
validator code to run...
|
by: Sam Samnah |
last post by:
Hi Everyone.
It has been a long time since my last post. Nevertheless, I have built a
custom server control that allows a user to edit text, bolding, italics
strike though table insertion and manipulation etc etc. The control works
perfectly when placed outside a templated control but when placed in, for
instance, a datagrid EditItemTemplate, I get the following error on the
DataBind Method: the dreaded "Object not set to a referance"...
|
by: Lee |
last post by:
Hi all, I'm trying to programatically change the background color of
lines of text and running into a few difficulties, anyone got any
suggestions?
my relevant code is as follows:
public void colorLines() {
//_Paint = false; //don't want to update while we are doing
this
//loop thru lines like addText() does
| |
by: Jakob Lithner |
last post by:
When I started a new ASP project I was eager to use the login facilities
offered in Framework 2.0/VS 2005.
I wanted:
- A custom principal that could hold my integer UserID from the database
- An easy way to classify different pages as either Admin, Member or Public,
where login is necessary for Admin and Member but not for Public. My idea was
to put the pages in different directories to easily keep my order.
- An easy menu system that...
|
by: --== Alain ==-- |
last post by:
Hi,
I'm coming back on the ListView component that i would like to design.
I finally finish to analyse how it should work (on paper).
So i have properties, methods and events that i should implement.
I found several points that must base component respects to implement it.
- it should implement a canvas/GDI to allow drawing (to allow
transparency, borders, headers, alignment, colors,...)
- it should allow containers in order to...
|
by: hyperpau |
last post by:
Before anything else, I am not a very technical expert when it comes to VBA coding.
I learned most of what I know by the excellent Access/VBA forum from bytes.com (formerly thescripts.com).
Ergo, I will be writing this article intended for those who are in the same level, or maybe lower, of my technical knowledge.
I would be using layman's words, or maybe, my own words as how I understand them, hoping, you will understand it the same way that...
|
by: hyperpau |
last post by:
Before anything else, I am not a very technical expert when it comes to VBA coding.
I learned most of what I know by the excellent Access/VBA forum from bytes.com (formerly thescripts.com).
Ergo, I will be writing this article intended for those who are in the same level, or maybe lower, of my technical knowledge.
I would be using layman's words, or maybe, my own words as how I understand them, hoping, you will understand it the same way that...
|
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,...
|
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...
| |
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,...
|
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...
|
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...
|
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...
|
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: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |