Recent

Author Topic: The issue of serial display after entering a mixed string of Chinese and English  (Read 372 times)

jianwt

  • Full Member
  • ***
  • Posts: 164
在memo里输入 中文+英文字母数字混合字符串后显示串行的问题。
在memo里本来是一行显示,但中文后被断开成2行显示了。这种问题该如何解决。谢谢!
The issue of serial display after entering a mixed string of Chinese and English letters and numbers in the memo.

It was originally displayed in one line in the memo, but the Chinese characters were later split into two lines for display. How should this kind of problem be solved? Thank you!

GTK2  lazarUS3.2
Code: Pascal  [Select][+][-]
  1.  
  2. procedure TForm1.FormCreate(Sender: TObject);
  3. begin
  4.    memo1.Lines.Add('中文Assynhklo4444444444444444444444488877779999898965645454545454545');
  5.  
  6. end;  
  7.  
  8.  

Fibonacci

  • Hero Member
  • *****
  • Posts: 949
  • Behold, I bring salvation - FPC Unleashed
The line is simply too long, so it has to wrap somewhere. If you dont want the lines to auto-wrap, set the WordWrap property of the TMemo to False.
FPC Unleashed - inline vars, tuples, statement expressions, array equality, compound assignments, indexed/lazy labels, no-RTTI & more. ⭐ Star it on GitHub!

 

TinyPortal © 2005-2018