just one minor glitch, if you resize a column the click triggers a column sort also heehee, i guess it needs to detect if the mouse is over the column line bit
and here's just a minor cosmetic enhancement! you already have a dark line at the bottom of the header, so simply by complementing it with a single light line at the top its an inexpensive way to add a nice faux 3d touch to the otherwise flat Header
Code: Select all
Procedure _cust_tree_redraw_header() ...
... at the bottom ...
; horizontal line
Line(0, \lineHeight-2, \width, 1, \customization\lineColor)
Line(0, 0, \width, 1, RGB(255,255,255)) ;<-- my amazing contribution. I am not liable for any damages
it seems to overdraw the column line though - you can see its missing a pixel, perhaps just needs to be painted in different order! such a minor thing though so im not fussed if that pixel needs to stay lost, the added 3d look is worth it
{edit} i just inadvertently discovered another one heehee, also in the same procedure
Code: Select all
Line(\header(c.i)\position + \header(c.i)\width + left.i, 0, 1, \height, \customization\lineColor)
Simply by changing "left.i" to "left.i-1" it achieves the vertical 3d in header part of the separating lines:
and my other cosmetic... currently i get the feeling of an "empty icon", so i increased the width of the connecting line:
that is, in _cust_tree_redraw_item, a simple change of "+ 14" (just felt right to me, might not to others!) to the second Line() statement:
Code: Select all
Line(lineX.i,
yEntry.i + \lineHeight + lineH.i,
(\lineHeight / 2) + 14, ;<----- added "+ 14", make into a #configvar perhaps?
1,
#tree_fx_linecolor)
just icing on the cake stuff heehee
Another thing i found amazing about your control ...
BEFORE:
textWidth = DrawText(xEntry.i, yEntry.i, tree()\text, \customization\foregroundColor, \customization\backgroundColor)
AFTER:
textWidth = DrawText(xEntry.i, yEntry.i, "X", RGB(255,0,0), \customization\backgroundColor)
textWidth + DrawText(xEntry.i+14, yEntry.i, tree()\text, \customization\foregroundColor, \customization\backgroundColor)
=
multiple colors in the same line, its like richtext! and it was so simple! oh my gosh THE POWER!!! lol (room for a Checkbox there!)