Forum > LCL

TColorListbox problem with clNone - mark is not crossed

(1/1)

AlexTP:
Gtk2 and Win32.
Color marks for clNone are Not crossed. They must. LCL has code to cross clNone items:

colorbox.pas

--- Code: Pascal  [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---  if NewColor = clNone then  begin    NewColor := NoneColorColor;    noFill := true;  end..   Canvas.Brush.Color := NewColor;  Canvas.Pen.Color := clBlack; ..  if noFill then  begin    Canvas.Line(r.Left, r.Top, r.Right-1, r.Bottom-1);    Canvas.Line(r.Left, r.Bottom-1, r.Right-1, r.Top);  end; 
Example app: it has ColorListbox and OnCreate event:


--- Code: Pascal  [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---procedure TForm1.FormCreate(Sender: TObject);begin  List.Items.Clear;  List.Items.AddObject('test clNone', TObject(clNone));  List.Items.AddObject('test yellow', TObject(clYellow));end; 
property NoneColorColor set to white.

AlexTP:
Added patch for this. same as TColorBox does. same code.

lucamar:
Maybe you should add this (both the first post and the patch) to the bug tracker. Just saying. :)

Navigation

[0] Message Index

Go to full version