After sucessfully integrating ATTab for to solve missing functionalities of the Lazarus page control on windows (x64) lately i now encountered some strage behaviour that i cannot solve at all.
The first thing is, although OptVarWidth had been set to true, it is tried to truncate the string (putting ellipses in part of it).
I would have expected no truncation unless i define a maxlength of the caption (OptTabWidthMaximal, but it does not seem to have effect),
The second thing is:
In an easy test context (the compontent witin a panel within a Form) a test caption will look ok like in sample_good.jpg (test caption text hre is: sample_ABCD_1234):
in the real app, with more complicated nested component structure (therefore not possible to elaborate a test case). it looks like it sample_bad.jpg
Obviously the character for the trancation ellipsis ("...", as unicode character) had not been painted correctly. A vertical bar is painted instead.
That goes back to a call to the procedure DoTextOut (within attabs.pas) having the truncation routine (made by
CanvasCollapseStringByDots from atcanvasprimitives.pas) as input parameter "AText" . And then:
DoTextOut(C: TCanvas; AX, AY: integer; const AClipRect: TRect; const AText: string);
does either (this depends on ifdefs)
var Str: WideString;
Str:= UTF8Decode(AText);
ExtTextOutW(C.Handle, AX, AY, ETO_CLIPPED, @AClipRect, PWideChar(Str), Length(Str), nil);
resp. or:
ExtTextOut(C.Handle, AX, AY, ETO_CLIPPED, @AClipRect, PChar(AText), Length(AText), nil);
I tried both variants and they failed both.
Maybe the Canvas involved has (due to the context) not the right properties, but i really get no clue how to fix that problem. Any idea about possible causes would be very welcome