Delphi 2010 and RichEdit problem [Edit]

I am using Delphi 2010 and RichEdit control. 
When set RichEdit controls WantReturns to False And WordWrap to False. When running application and entering some word in to richedit and clicking to enter key then richedit control text is wrapped and cursor moved new line. 

Wantreturns property doesnt works. (In the delphi 7 working well)

When using Memo control is ok.
TRichEdit's wantreturns set false not working.

How to fix it?

Edited by: Amar Avirmed on Mar 10, 2010 5:17 PM
0
Amar
3/11/2010 1:17:38 AM
embarcadero.delphi.vcl.using 2297 articles. 1 followers. Follow

1 Replies
1311 Views

Similar Articles

[PageSpeed] 6

Amar Avirmed wrote:

> I am using Delphi 2010 and RichEdit control. 
> When set RichEdit controls WantReturns to False And WordWrap to
> False. When running application and entering some word in to richedit
> and clicking to enter key then richedit control text is wrapped and
> cursor moved new line.
> 
> Wantreturns property doesnt works. (In the delphi 7 working well)
> 
> When using Memo control is ok.
> TRichEdit's wantreturns set false not working.
> 
> How to fix it?

Delphi 2010, using Unicode thoughout, uses a slightly different version
of the richedit common control than older versions did. Microsoft seems
to have changed something in the Unicode version of the control that
causes the property to not work anymore.

To fix this, add a handler to the richedit control's OnKeyDown event.
In the handler, do this:

   if (Key = VK_RETURN)
     and not ((ssCtrl in Shift) or (Sender as TRichedit).WantReturns)
   then begin
     Key := 0;
     Perform(CM_DIALOGKEY, Key, 0);
   end;

This will redirect the enter/return key to the form level as the
message that the VCL uses to fire a button with Default set to true but
still allows you to use Ctrl-Enter to insert a linebreak in the
richedit control.


-- 
Peter Below (TeamB)  
Don't be a vampire (http://slash7.com/pages/vampires), 
use the newsgroup archives :
http://codenewsfast.com
http://groups.google.com
0
Peter
3/11/2010 6:36:38 PM
Reply:

Similar Artilces:

Problem using InstallAware 7 CodeGear Special Edition with Delphi 2010 [Edit]
Hi Everyone, I am trying to create an installation disk for my delphi 2010 application using the installAware that kind of comes with Delphi 2010. When I try to built it, it keeps giving me the error message:- No files matching pattern "C:\Windows\system32\\*120.bpl" and when I look into my windows\system32 folder, there the files with extension *.bpl end with *140.bpl and not *120.bpl like it was expected. Can anyone tell me if I am doing something wrong or how I can get around this. Thanks in advance. Edited by: Tat Hon Chu on Dec 3, 2009 12:55 AM > {quo...

Delphi 2010 and RichEdit problem. [Edit]
I am using Delphi 2010 and RichEdit control. When set RichEdit controls WantReturns to False And WordWrap to False. When running application and entering some word in to richedit and clicking to enter key then richedit control text is wrapped and cursor moved new line. Wantreturns property doesnt works. (In the delphi 7 working well) When using Memo control is ok. TRichEdit's wantreturns set false not working. How to fix it? Edited by: Amar Avirmed on Mar 10, 2010 5:18 PM Hello, you might get more answers to your question when asking this in the ..vcl.components.usinn...

Using Delphi 7 and Delphi 2010
I had a project in Delphi 7. I worked on it in Delphi 2010. When I try to open the .dpr again in Delphi 7, the IDE toolbar widens across both monitors, and Delphi 7 locks up. It appears that Delphi 2010 modifies the .dpr in a way that makes Delphi 7 unable to open it again. All my forms & units appear to open fine in D7 after D2010, except for the warnings on the ExplicitHeight and ExplicitWidth properties being missing... I can easily recreate the .dpr, but is this expected behavior? Thanks. Tom Field wrote: > I had a project in Delphi 7. > > I worked o...

Code works in Delphi 7 but not in Delphi 2010 [Edit]
hello, i have a procedure that open's a file by passing the file name as the parameter to the executable. something like this {code} C : \ P r o g r a m F i l e s \ Da c k e r \ D r a c k e r . e x e " G : \ D E l p h i 7 \ D e l p h i 7 A p p _ l o g . t " {code} The source code is {code} procedure OpenFileWithExe var hReg: HKEY; Ret: Longint; RegDataType, RegDataSize: DWORD; CmdLine: array [0..560] of Char; Len: Integer; SInfo: TStartupInfo; PInfo: TProcessInformation; begin Ret := windows.RegOpenKeyEx(HKEY_CURRENT_USER, ...

Update Delphi 2005 to Delphi 2010, which do i need? [Edit]
Hello, we have one Delphi 2005 Professional here and want to upgrade to Delphi 2010, but we are a bit confused. Our distributor in Germany, ingram-micro offers several upgrade products: UPG DELPHI 2010 PRO - NAMED USER UPG DELPHI 2010 PRO - NAMED USER ELS UPG DELPHI 2010 PRO - NAMED USER FLEX RAD STUDIO 2010 PRO - UPG UPG RAD STUDIO 2010 PRO - NAMED ELC UPG RAD STUDIO 2010 PRO - NAMED FLEX UPG DELPHI 2010 PRO - CONCURRENT ELS UPG DELPHI 2010 PRO - CONCURRENT FLEX What do they mean exactly and which one do i need? At the moment delphi is installed on two PCs and we want to use ...

Delphi 2006 to Delphi XE Crystal BPL problem [Edit]
I am in the process of migrating our application from Delphi 2006 to Delphi XE and, for ease of use, I have both 2006 and XE installed on my development computer. I access Crystal Reports XI RDC in our application and so I rebuilt the BPL in XE in order to add the new package to XE. However, when I try to add the package to XE I get the error message: “Registration procedure, Craxddrt_tbl.Register in the package c:\Documents and Settings\All Uers\Documents\RADS Studio\8.0\BPL\Crystal.bpl raised exception class EFilerError: Component TDatabase can’t be registered by package crystal.bpl be...

problem delphi 2010 apps with a delphi 5 pro Pchar
Hallo I build on till now alle tools and programas with delphi 5 pro now i have delphi 2010 want don't want rewite alle my DLL Tools Like The tool i made for making PDF In case of This DLL i can't becose the vcl i use in delphi 5 will not work in delphi 2010 *This call in apps* {code} Function GenratePDF(Settings:Pchar):Boolean; stdcall external 'GUPPDF2.dll'; {code} *In delphi 5 DLL* {code} Function GenratePDF(Settings:Pchar):Boolean; stdcall; {code} if call the function i get a "Access violation" i think that the settings parameter empty is...

Using WordApplication in Delphi 2010 [Edit]
Hello Everyone, I am having a problem with WordApplicatio component. I am using Delphi 10. I can get the WordApplication to open with the Document template that I select, but Word is behind my app and when I close Word I get an RPC Server not available errror and after that a pointer violation and then access violations until I reset the IDE. Here is the code I am using: procedure TTestLetterForm.Button1Click(Sender: TObject); var FileName: oleVariant; begin //Letter2Report.Print; if OpenDialog.Execute = True then begin FileName := OpenDialog.Fil...

How to use IThumbnailProvider in Delphi 2010? [Edit]
Hello, I try to use IThumbnailProvider for getting thumbnail from the file. I can not get ThumbnailProvider, the result of the line "result := fileShellItem.BindToHandler(nil, BHID_ThumbnailHandler, IID_IThumbnailProvider, thumbProvider );" is always false. Could someone help me? Regards Eric P.S. I use Win7/64 type {$EXTERNALSYM IThumbnailProvider} IThumbnailProvider = interface(IUnknown) ['{e357fccd-a995-4576-b01f-234630154e96}'] function GetThumbnail(cx : uint; out hBitmap : HBITMAP; out bitmapType : dword):HRESULT;stdcall; end; const ...

Problem with query delphi 2010 [Edit]
Problem with query delphi 2010 Staff when I perform the query below I describe the following error occurs: Exception class EAccessViolation with message 'Access violation at address in module 03E64A60' dbxora.dll '. Write of address 004B0041 '. Process PdvMultiEmpresa.exe (5704). The query that esecuto is as follows: SQL.Add ('SELECT *'); SQL.Add ('FROM TABLE (pac_pdv_totalcard.CONSULTA_CONTA_CARTAO (: p_cod_empresa,: p_cpf,: p_nro_cartao,: p_nro_conta ))'); ParamByName ('p_cod_empresa'). AsFmtBcd: = IntegerToBcd...

Problems
Hi; We have a software developed in the Delphi 2009 and we do NOT use the runtime themes. So, the option: Projetct / Options / Application / Enable Runtime Themes is UNCHECKED. When I'm on the Delphi 2009, it's all right. The problem is when I use the Delphi 2010. The same configuration (Projetct / Options / Application / Enable Runtime Themes is UNCHECKED). The form editor (IDE) insists on show the forms with the current Windows theme. I don't like this, I want the runtime themes off while I'm programming and editing my forms. How can I solve it? Thanks to...

Delphi 2010 produces much larger binaries than Delphi 2009 [Edit]
When I compile my project with Delphi 2010 the resulting executable is about 30% larger than the one compiled with Delphi 2009. Both binaries are compiled with the same source code and project options. The size of individual DCU files increases by 5-20%. Has anybody experienced similar results? Has anybody an idea what could cause this? It surprises me, as the changes in syntax and VCL have not been that big. Best regards, Joachim Edited by: Joachim Marder on Sep 25, 2009 6:07 AM "Joachim Marder" wrote in message news:166152@forums.codegear.com... > When I compi...

Problem with printing, using Delphi XE2 [Edit]
I have problem with printing images using Delphi XE2. I have code Delphi 7, and this code work very well. {code} procedure Print; var ImgName: string; rect: TRect; jpg: TJPEGImage; begin OpenPictureDialog1.Execute; ImgName := OpenPictureDialog1.FileName; rect.TopLeft:=Point(0,0); rect.BottomRight:=Point(Printer.PageWidth,Printer.PageHeight); jpg := TJPEGImage.Create; jpg.LoadFromFile(ImgName); Printer.BeginDoc; Printer.Canvas.StretchDraw(rect,jpg); Printer.EndDoc; end; {code} But this code Delphi XE2 is not work, printer print clear sheets. (HP ...

Problems with Icons in the Delphi 2010 palette [Edit]
Hello, I am converting some private packages from Delphi 5 to Delphi 2010 and I encounter some problems with the images associated to the components. The Delphi 2010 IDE doesn't associate the images with some components but it works with some others. With the same resource file, the Delphi 5 IDE associates correctly the images to all the components. All the bitmaps defined in the resource file are : 24x24 pixels and 16 colors. During the installation of the packages, all the components are correctly registered and they appear in the palette with the Delphi default image for compo...

Web resources about - Delphi 2010 and RichEdit problem [Edit] - embarcadero.delphi.vcl.using

RichEdit is a surprising WordPad replacement
... Professional , FXiTE are just a few we’ve covered in the past. But if plain text editing isn’t enough then you might be interested in RichEdit ...

Features new to Windows Vista - Wikipedia, the free encyclopedia
Windows Vista (formerly codenamed Longhorn ) has many new features compared with previous Microsoft Windows versions, covering most aspects of ...

Smalltalk Digest: November Edition
Grow with Us! Be Part of Our Growing Cincom Smalltalk Team! Check It Out! New Cincom® ObjectStudio® Release — Cincom ObjectStudio 8.5 Now Available! New ...


flipcode - Developer's Toolbox
See what's going on with flipcode! This section of the archives stores flipcode's complete Developer Toolbox collection,featuring a variety of ...

February's Patch Tuesday and Windows is airtight once again.
Microsoft closes all known critical holes and a couple of yet unknown. 12 patches have been released for a total of 19 holes in Windows, Office, ...

Murray Sargent: Math in Office
One of the key technologies behind the high quality display of mathematical text in Word 2007 and RichEdit 6.0 is a special component called ...

Microsoft Office 2000 - Secunia.com
Secunia Community Login VIM Login Partner Login PRODUCTS SOLUTIONS CUSTOMERS PARTNER RESOURCES COMPANY CAREERS COMMUNITY BLOG Overview Home Community ...


a 'mooh' point - - Page not found
a 'mooh' point Clearly an IBM drone ... Filter by APML Home Archive Contact Subscribe Log in Ooops! I can't find the page you're looking for ...

Resources last updated: 12/20/2015 10:09:12 AM