This forum is deprecated.
This worked in 10.3. The exact same code now displays incorrectly at first in 10.4. When the listviews are re-displayed the fonts etc change to my settings.
.Any solutions please? The exact same code worked in 10.3 on both Android & IOS.
Now in 10.4 all my Listviews in my project show the wrong font size, colour or (in some cases) boldness at first.
As soon as they are re-displayed, they then show correct colours, sizes etc from then on.
Can anybody suggest a workaround and can Embarcadero please explain this 10.4 "new feature" / BUG ??? please? - Thanks John Jefkins
I've now raised this with the helpful people @ Idera/Embarcadero.... I'll post what their response is here.
My issue is that what worked before (in 10.3) really should stay working in 10.4.
If you have a Designview ability to plonk text in a Listview, where you want it & in what colour & font size that you want, then that should surely be obeyed without then having to write machine code as if we were back in the 1980s.
What you see really should be what you get ???
best wishes to all.
Roy @ Embarcadero support has (a) logged this as a bug and (b) provided this workaround in the meantime.
The workaround (which I've proved does work) is to add this code & use this procedure for the Listview's UpdateObjects event.
procedure TPersonForm.ListView1UpdateObjects(const Sender: TObject;
const AItem: TListViewItem);
XTextItem : TListItemText;
Savedcolor : TAlphaColor;
SavedFontStyles : TFontStyles;
Savedsize : single;
I : integer;
for I := 0 to AItem.Objects.Count-1 do
if AItem.Objects.Drawables[I] is TListItemText then
XTextItem := AItem.Objects.Drawables[I] as TListItemText;
SavedFontStyles := XTextItem.Font.Style;
Savedcolor := XTextItem.TextColor;
Savedsize := XTextItem.Font.Size;
//set properties to ANY other value
XTextItem.Font.Style := ;
XTextItem.TextColor := 0;
XTextItem.Font.Size := 0;
//reset saved properties...
XTextItem.Font.Style := SavedFontStyles;
XTextItem.TextColor := Savedcolor;
XTextItem.Font.Size := Savedsize;
Roy, can you please give us the Bug Nr in quality center. So it is much more easy to follow the bug and it's correction.
He logged it as a bug on this reference RS-101846
Thanks, is it possible that this bug will be tracked as RSP Bug in the quality center?
The RS- Number is an internal ID at EMB and I can't find it in the quality center.
I'm just a user. Please ask that to Idera. Can anybody answer this please?
use this code in Form Create
ListView1.PrepareForPaint ..and your problem is gone
I tried this but in my situation it doesn't help.