trichview.com

trichview.support




Re: Select cell content on double click


Return to index


Author

Message

Alexander Fatykhov

Posted: 11/06/2003 22:03:45


Hello, Sergey!

You wrote:


ST> If I understand you, signed byte -92 = $A4 = unsigned byte 164.

ST> This is a currency symbol �, not a space.

ST> There is the non-breaking-space nearby in the character table, char

ST> code = 160


I've in table cell text like 'Sum: 123 321,32'

I'm creating rtf "on fly" like

\trowd\trql\trkeep

\clbrdrl\brdrw10\brdrs\clbrdrt\brdrw10\brdrs\clbrdrr\brdrw10\brdrs\clbrdrb\b

rdrw10\brdrs

\cellx10000

\pard\plain\intbl

\f1\fs14\qc\li25\ri25


Sum: 123 321,32


\cell

\row


cell text is formatted like "Sum: " + FormatFloat("0,.00", sum);



Then in OnDblClick I want to remove spaces and use:

ShowMessage(

AnsiReplaceText(RichViewEdit->TopLevelEditor->GetCurrentItemText(), " ",

")  );


but I still have spaces like this "Sum:123 321,32" - (only in sum)


to detect space char code I wrote this:


AnsiString txt = RichViewEdit->TopLevelEditor->GetCurrentItemText();

for (int i = 1; i <= txt.Length(); i++)

  ShowMessage( "'" + AnsiString(txt[i]) + "'  =  " + IntToStr(

char(txt[i]) );


and in result

' '  =  -92





Powered by ABC Amber Outlook Express Converter