Re: [Lazarus] String with °

2013-10-10 Thread Michael Van Canneyt
On Thu, 10 Oct 2013, Kamen Kamen wrote: Hello, I have string with ° and I want to delete all symbols to °. When I delete symbol ° returns #176. How can I delete this symbol? What is the encoding of this string ? UTF8 ? Exampe: s := '49°45 '; After: delete (s, 1, 2); -- '°45 ' After:

Re: [Lazarus] String with °

2013-10-10 Thread Mattias Gaertner
On Thu, 10 Oct 2013 11:52:24 +0300 (EEST) Kamen Kamen kamenl...@abv.bg wrote: Hello, I have string with ° and I want to delete all symbols to °. When I delete symbol ° returns #176. How can I delete this symbol? Exampe: s := '49°45 '; After: delete (s, 1, 2); -- '°45 ' After:

Re: [Lazarus] String with °

2013-10-10 Thread Hans-Peter Diettrich
Kamen Kamen schrieb: I have string with ° and I want to delete all symbols to °. When I delete symbol ° returns #176. How can I delete this symbol? Exampe: s := '49°45 '; After: delete (s, 1, 2); -- '°45 ' After: delete (s, 1, 1); or delete (s, pos ('°', s), 1); -- #176'45 ' I want to

Re: [Lazarus] String with °

2013-10-10 Thread Mattias Gaertner
On Thu, 10 Oct 2013 11:10:39 +0200 Hans-Peter Diettrich drdiettri...@aol.com wrote: [...] When working with strings containing non-ASCII characters you should forget about Char and character (byte) based functions. Use strings instead, even for single letters, and the string based functions

Re: [Lazarus] String with °

2013-10-10 Thread Michael Schnell
As Lazarus works with UTF8, and the string functions like pos and delete count bytes rather than (visible) characters, you can't use the visible character position for these functions. -Michael -- ___ Lazarus mailing list

Re: [Lazarus] String with °

2013-10-10 Thread Bart
On 10/10/13, Michael Schnell mschn...@lumino.de wrote: As Lazarus works with UTF8, and the string functions like pos and delete count bytes rather than (visible) characters, you can't use the visible character position for these functions. As Mattias pointed out: in this case Use

Re: [Lazarus] String with °

2013-10-10 Thread Mattias Gaertner
On Thu, 10 Oct 2013 11:25:48 +0200 Michael Schnell mschn...@lumino.de wrote: As Lazarus works with UTF8, and the string functions like pos and delete count bytes rather than (visible) characters, you can't use the visible character position for these functions. The visible character

Re: [Lazarus] String with °

2013-10-10 Thread Kamen Kamen
Thanks, Mattias! Now is OK. Оригинално писмо От: Mattias Gaertner Относно: Re: [Lazarus] String with ° До: lazarus@lists.lazarus.freepascal.org Изпратено на: Четвъртък, 2013, Октомври 10 11:57:04 EEST On Thu, 10 Oct 2013 11:52:24 +0300 (EEST) Kamen Kamen kamenl

Re: [Lazarus] String with °

2013-10-10 Thread Mattias Gaertner
On Thu, 10 Oct 2013 11:38:39 +0200 Bart bartjun...@gmail.com wrote: On 10/10/13, Michael Schnell mschn...@lumino.de wrote: As Lazarus works with UTF8, and the string functions like pos and delete count bytes rather than (visible) characters, you can't use the visible character position

Re: [Lazarus] String with °

2013-10-10 Thread Kamen Kamen
Thanks, Bart! Where I can find help for LazUtf8 unit? I was looking here: http://www.freepascal.org/docs.var with no success. Оригинално писмо От: Bart Относно: Re: [Lazarus] String with ° До: Lazarus mailing list Изпратено на: Четвъртък, 2013, Октомври 10 12:38

Re: [Lazarus] String with °

2013-10-10 Thread Kamen Kamen
Thanks, Mattias! Оригинално писмо От: Mattias Gaertner Относно: Re: [Lazarus] String with ° До: lazarus@lists.lazarus.freepascal.org Изпратено на: Четвъртък, 2013, Октомври 10 13:24:00 EEST On Thu, 10 Oct 2013 11:38:39 +0200 Bart bartjun...@gmail.com wrote: On 10

Re: [Lazarus] String replace bug (in Delphi it's OK)

2012-07-17 Thread silvioprog
2012/7/15 Bart bartjun...@gmail.com: On 7/15/12, silvioprog silviop...@gmail.com wrote: Hi, Please see here: http://bugs.freepascal.org/view.php?id=22441 It's not a StringReplace bug. It's probably the handling of LineFeeds without Carriagreturn when setting TMemo.Text that explains your

[Lazarus] String replace bug (in Delphi it's OK)

2012-07-15 Thread silvioprog
Hi, Please see here: http://bugs.freepascal.org/view.php?id=22441 Thx. -- Silvio Clécio My public projects - github.com/silvioprog -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org

Re: [Lazarus] String replace bug (in Delphi it's OK)

2012-07-15 Thread Bart
On 7/15/12, silvioprog silviop...@gmail.com wrote: Hi, Please see here: http://bugs.freepascal.org/view.php?id=22441 It's not a StringReplace bug. It's probably the handling of LineFeeds without Carriagreturn when setting TMemo.Text that explains your results. See my note in the bugtracker.

Re: [Lazarus] String grids

2012-03-01 Thread David Copeland
To: Lazarus mailing list lazarus@lists.lazarus.freepascal.org Subject: Re: [Lazarus] String grids Date: Wed, 29 Feb 2012 14:37:31 -0300 There's a lot more you can do with String Grids http://wiki.lazarus.freepascal.org/Grids_Reference_Page 2012/2/29 David Copeland david.copel...@jsidata.ca

Re: [Lazarus] String grids

2012-02-29 Thread kmi
Is there any way (hopefully easy) to change the background colour of a specific cell in a stringgrid? procedure TForm1.SG1PrepareCanvas(sender: TObject; aCol, aRow: Integer; aState: TGridDrawState); begin SG1.Canvas.brush.color := clWhite; If (aCol = 4) and (aRow = 1) Then

Re: [Lazarus] String grids

2012-02-29 Thread David Copeland
Thanks! /Dave. -Original Message- From: k...@vgdata.dk Reply-to: Lazarus mailing list lazarus@lists.lazarus.freepascal.org To: Lazarus mailing list lazarus@lists.lazarus.freepascal.org Subject: Re: [Lazarus] String grids Date: Wed, 29 Feb 2012 16:39:11 +0100 (CET) Is there any way

Re: [Lazarus] String grids

2012-02-29 Thread Alexsander Rosa
There's a lot more you can do with String Grids http://wiki.lazarus.freepascal.org/Grids_Reference_Page 2012/2/29 David Copeland david.copel...@jsidata.ca Thanks! /Dave. -- Atenciosamente, Alexsander da Rosa http://rednaxel.com -- ___ Lazarus

[Lazarus] (String)Grid adds new rows automatically

2011-05-19 Thread Juha (gmail)
Hi I added to CustomGrid's Options a feature goAutoAddRows. It adds a new row automatically when user presses down arrow on the last line and there is something written. It affects StringGrid and other grids, too. Please test. Juha -- ___ Lazarus

[Lazarus] string, ansistring, exit, break, message, index [Re: Syntax highlighting anomalies]

2010-10-29 Thread Martin
On 09/10/2010 12:26, Bernd Kreuss wrote: Attached is a diff of my changes: * do not highlight String * do not highlight AnsiString * do not highlight WideString * highlight break * highlight continue * highlight exit All implemented, options under: editor / display / markup * highlight

[Lazarus] String Grid MouseToCell seems inconsistent when deleted some columns

2010-09-07 Thread Lukasz Sokol
Hi Group, would there be a problem with StringGrid on Lazarus 0.9.28.2 r22279 FPC 2.2.4 i386-win32-win32/win64 that is preventing MouseToCell from working correctly if some columns have been deleted ? (snippet) { put a StringGrid1 on the form } {have one row fixed FixedRows := 1} {hook this

Re: [Lazarus] String Grid MouseToCell seems inconsistent when deleted some columns

2010-09-07 Thread faber
2010/9/7 Lukasz Sokol el.es...@gmail.com: procedure TForm1.StringGrid1Click(Sender: TObject); var gridcell : TPoint; begin gridcell := StringGrid1.MouseToCell(Mouse.CursorPos); StringGrid1.Cells[gridcell.x,0] := IntToStr(gridcell.x); {what text do you get in fixed row of the visible

Re: [Lazarus] String Grid MouseToCell seems inconsistent when deleted some columns

2010-09-07 Thread Lukasz Sokol
Hello faber, On 07/09/2010 15:45, faber wrote: [...] try with StringGrid1.MouseToCell(ScreenToClient(Mouse.CursorPos)) Oh... yes that solved the issue. Sorry for the noise :) i was searching for the ScreenToClient, but $Deity knows why I was looking for it as procedure of the StringGrid itself

Re: [Lazarus] String Grid MouseToCell seems inconsistent when deleted some columns

2010-09-07 Thread Jesus Reyes
--- El mar 7-sep-10, Lukasz Sokol el.es...@gmail.com escribió: De: Lukasz Sokol el.es...@gmail.com Asunto: Re: [Lazarus] String Grid MouseToCell seems inconsistent when deleted some columns A: Lazarus mailing list lazarus@lists.lazarus.freepascal.org Fecha: martes, 7 de septiembre de 2010

Re: [Lazarus] String Grid MouseToCell seems inconsistent when deleted some columns

2010-09-07 Thread Lukasz Sokol
On 07/09/2010 16:16, Jesus Reyes wrote: --- El mar 7-sep-10, Lukasz Sokol el.es...@gmail.com escribió: De: Lukasz Sokol el.es...@gmail.com Asunto: Re: [Lazarus] String Grid MouseToCell seems inconsistent when deleted some columns A: Lazarus mailing list lazarus