Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / New Users / March 2008

Tip: Looking for answers? Try searching our database.

Tab and Ctrl+I in a richtextbox

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Fred - 08 Mar 2008 13:50 GMT
Hello,

I program a user control which display a RichTextBox and a format
ToolStrip.
I want to process some shortcut keys.
The RichTextBox accepts tab.
Ctrl + I is supposed to format the selection in italic.
But Ctrl+I is also de code for Tab.
So when I press Ctrl+I, a tab is inserted (replacing the current
selection) AND the new selection is formatted in italic.

How can I do this ? Do I have to inherit first the standard RichTextBox
and override the OnKeyDown method ?

Signature

Fred
foleide@free.fr

Fred - 08 Mar 2008 14:05 GMT
Dans : news:eXL2QNSgIHA.4376@TK2MSFTNGP05.phx.gbl,
Fred disait :
> Hello,
>
[quoted text clipped - 9 lines]
> How can I do this ? Do I have to inherit first the standard
> RichTextBox and override the OnKeyDown method ?

Of course not, just have to set the SuppressKeyPress property of the
KeyEventArgs parameter to false !!!

Signature

Fred
foleide@free.fr


Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.