1. Richard Torcasio
  2. PowerBuilder
  3. Monday, 30 September 2019 03:33 AM UTC

I have a column that displays data, from a select properly (ex 1 below), but when the column is clicked on and gains focus, all the line breaks disappear and the text display changes to one big line of text (ex 2 below).

 

The only edit tab checkboxes that are checked are vertical scroll bar and auto vertical scroll.

 

I'm using pb 2019 build 2082.

 

ex 1:

Hello,

second line wit a blank after the first.

 

third line with 2 blank lines before the second.

 

ex 2:

Hello,second line wit a blank after the first.

third line with 2 blank lines before the second.

 

Richard Torcasio Accepted Answer Pending Moderation
  1. Tuesday, 1 October 2019 23:14 PM UTC
  2. PowerBuilder
  3. # 1

Hi John and thanks for the reply!

 

In general I would agree but why does it display differently when the columns has focus and when it doesn't (a bit rehtorical of course :) )

 

My thinking would be it should display the same in both cases, and that is should never display with the extra line breaks as we would expect.

 

Rich

Comment
  1. John Fauss
  2. Wednesday, 2 October 2019 01:54 AM UTC
I can't say for sure, but I suspect it's because when the column DWObject has input focus, you are actually interacting with the DW Edit Control, not the column DWObject. Obviously, there is some difference(s) in the way a column DWObject using the Edit style handles stand-alone line-feed characters than the way the Edit Control does.
  1. Helpful
  1. Richard Torcasio
  2. Wednesday, 2 October 2019 01:59 AM UTC
Agreed. I think we have tried everything with our power so I opened a support case. I'll post the response here once I get it.
  1. Helpful
There are no comments made yet.
Richard Torcasio Accepted Answer Pending Moderation
  1. Tuesday, 1 October 2019 23:10 PM UTC
  2. PowerBuilder
  3. # 2

Hi Chris !

 

I changed it also from 80 to 800 then retrieved the datawindow and clicked from the subj column to the body column and the same problem occured.

 

I noticed your data looked different from mine, if you typed in new text instead of retrieving that could be why the results are different.

 

Thanks,

Rich

Comment
  1. Miguel Leeuwe
  2. Tuesday, 1 October 2019 23:14 PM UTC
Is your text pasted form maybe some internet web page? Line endings might be different.
  1. Helpful
  1. Richard Torcasio
  2. Tuesday, 1 October 2019 23:16 PM UTC
No it is from the sql painter but that does mimic what is stored in the database, which does not include a char(13) before char(10)
  1. Helpful
  1. Chris Pollach @Appeon
  2. Wednesday, 2 October 2019 14:27 PM UTC
Hi Richard;

FWIW: You need to change *both* the "Body" and "Base_Body" columns in your DWO definition from a size 80 to 800 (or whatever is the best max size).

Regards ... Chris
  1. Helpful
There are no comments made yet.
Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Tuesday, 1 October 2019 18:40 PM UTC
  2. PowerBuilder
  3. # 3

Hi Richard;

   The DWO's error is related to the column size. I changed it from 80 => 800 and the error(s) have disappeared.

Regards .... Chris

Comment
There are no comments made yet.
John Fauss Accepted Answer Pending Moderation
  1. Tuesday, 1 October 2019 13:56 PM UTC
  2. PowerBuilder
  3. # 4

The problem is in your data, not the DataWindow.

A new line break in PowerBuilder is a CR/LF (carriage-return/line-feed)sequence, Char(13)+Char(10), or Nchar(13)+NChar(10) if your SQL SELECT produces Unicode.

You are supplying only the line-feed character.

Comment
There are no comments made yet.
Richard Torcasio Accepted Answer Pending Moderation
  1. Tuesday, 1 October 2019 01:59 AM UTC
  2. PowerBuilder
  3. # 5

Sure. This version displays the error right in the IDE and does not require a specific table so just click between the subj column and the body column.

Attachments (1)
Comment
There are no comments made yet.
John Fauss Accepted Answer Pending Moderation
  1. Tuesday, 1 October 2019 01:43 AM UTC
  2. PowerBuilder
  3. # 6

Hi, Richard -

Can you attach the exported source for the DataWindow object in question? It might speed up the process...

Comment
There are no comments made yet.
Richard Torcasio Accepted Answer Pending Moderation
  1. Monday, 30 September 2019 23:06 PM UTC
  2. PowerBuilder
  3. # 7

Thanks for the reply. The box is not checked. I did try it with it checked just in case...

I'm going to attach pics to make the issue cleared.

Attachments (2)
Comment
There are no comments made yet.
Olan Knight Accepted Answer Pending Moderation
  1. Monday, 30 September 2019 23:01 PM UTC
  2. PowerBuilder
  3. # 8

In the Database Painter, on that column, in the EDIT tabpage:  see if you have EMPTY STRING IS NULL selected.
If so, then your blank lines will vanish when the column gains focus.

Olan

Comment
There are no comments made yet.
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.
We use cookies which are necessary for the proper functioning of our websites. We also use cookies to analyze our traffic, improve your experience and provide social media features. If you continue to use this site, you consent to our use of cookies.