It looks like a VCL flaw for me. The tbsDivider style tbsDivider not map to an equivalent style in Win32. A tool button with this style is implemented in VCL in the same way as the tbsSeparator style, but with a custom drawing method. This is extracted from TToolButton.Paint :
if Style = tbsDivider then with Canvas do begin R := Rect(Width div 2 - 1, 0, Width, Height); if StyleServices.Enabled then begin Details := StyleServices.GetElementDetails(ttbSeparatorNormal); StyleServices.DrawElement(Handle, Details, R); end else DrawEdge(Handle, R, EDGE_ETCHED, BF_LEFT) end;
In the old days of pre-v6 comctl32, the tbsSeparator style tbsSeparator mapped to the Win32 style button TBSTYLE_SEP . And in pre-v6 comctl32, which displays just like space without vertical lines. VCL developers clearly wanted to do more and added tbsDivider with a custom picture above.
Go to v6 comctl32. The common control now draws a vertical line on the left edge of all TBSTYLE_SEP . So the code above just adds an extra vertical line in the middle of the separator.
We can try to get rid of the left vertical line from a tbsDivider by changing the code as follows:
if Style = tbsDivider then with Canvas do begin if StyleServices.Enabled then begin //re-paint the background to remove the vertical line drawn //for the standard separator button R := Rect(0, 0, Width, Height); StyleServices.DrawParentBackground(FToolBar.Handle, Handle, nil, False, R); end; R := Rect(Width div 2 - 1, 0, Width, Height); if StyleServices.Enabled then begin Details := StyleServices.GetElementDetails(ttbSeparatorNormal); StyleServices.DrawElement(Handle, Details, R); end else DrawEdge(Handle, R, EDGE_ETCHED, BF_LEFT) end;
However, this will not work because it flickers a lot when the left line is drawn and then drawn over.
I suspect that VCL designers simply overlooked this secret detail when switching to v6 comctl32.
I will send a quality control report in due time.