Subject RE: [IBO] Carriage returns in grid
Author Support List
> I recently switched a TIBOQuery and TDBGrid to a TIB_Query and TIB_Grid.
> Using the old controls, if a string field contained a carriage return, it
> was displayed in the grid field as 2 vertical bars. With the new
> controls, only the first line is displayed.
>
> Example:
>
> With TIBOQuery and TDBGrid
> ==========================
> Markers||Black||4 Per Pack
>
> With TIB_Query and TIB_Grid
> ==========================
> Markers
>
> With the new components, I can only see the other 2 lines if I edit the
> contents and scroll.
>
> What setting do I need to change in my TIB_Query or TIB_Grid to get it to
> display all lines on a single line?

I am not sure if I have any settings for this.

What probably needs to happen is the painting routines need to do
single-line painting instead of memo or multi-line painting.

For the time being, you might try making use of the event to customize the
display of text.

You can replace the #13 and #10 characters with something else, like '#13'
and '#10'. Then, you will need to decode them as such.

OnGetDisplayText
OnGetEditText
OnSetEditText

I could add a new option to DrawCellTextOptions to automate this to some
extent. I'm open to suggestions if you think something would be helpful.
Rather than do the work in your app, you might try doing it inside the IBO
code and then submit it to me for acceptance.

Thanks,
Jason