Subject Re: [IBO] Is TIB_Grid broken?
Author Geoff Worboys
> Sorry, I though that I had asked on the list. I must have
> clicked on the wrong link. [...]

I am taking this back on-list now.


> It is a strange thing though: in the grid it comes up as
> #13#10 but in the TIB_Edit it comes up as two small boxes
> instead of the #13#10

This is pretty much what I expected.

The grid issue we have covered. I suggest you revert to a
v4.8 release that does not have this problem... or edit
IB_Grid.pas and change that block of text under the
// Now draw the text
comment to simply:
DrawTextA( Canvas.Handle, PAnsiChar(CellDisplayText), -1, tmpRect, tmpFlags )

which is what it had before - just compare the code from
that two releases and revert that function, this can safely
be done without effecting any of the other changes.


As for TIB_Edit:
> In the past I have had that, without the small boxes, show
> the first lines in the TIB_Edit fields normally E.G. only
> the first line. Of course there is no wordwrap to turn of

If you can do it I would like you to try reverting to a v4.8
release and seeing if the TIB_Edit behaviour is the same as
what you see in v4.9. I cannot see any reason for a change
in behaviour.

As I noted in my private response the two boxes thing is pretty
typical of Windows. The boxes are standard Windows and are the
way it displays characters the control or font does not support
(single line editor such as TIB_Edit cannot show multiple lines
and truncating the text to display just the first line would
not be my first choice). The standard small boxes allows the
control to be used without losing the original text even if it
cant display it as originally intended.


My own TIB_EditEnh control behaves differently (it replaces
cr/lf with a single space) but I am not convinced that is
strictly correct. The behaviour you describe with TIB_Edit is
probably a more typical/standard/Windows thing to do.

--
Geoff Worboys
Telesis Computing