Legend scroll bar thumb not tracking with mouse
Posted: Mon Mar 30, 2009 4:22 pm
Hello, I'm having these issues with the Legend Scroll Bar thumb:
Legend scroll bar set up as DrawStyle = dsWhenNeeded
When user drags the Legend Scrollbar Thumb with the mouse, the thumb does not stay with the mouse cursor. This does elminate the dsWhenNeeded problem below.
Legend scroll bar set up as DrawStyle = dsAlways : Thumb can be dragged all the way to the right, where it gets "locked" or "stuck" and cannot be pulled back to the left with the mouse, or moved back with the left arrow. This still has the dsWhenNeeded problem above.
Delphi 2009, TeeChart Pro v8.04.11395 Win32 (XP)
object chrtTst: TChart
Left = 2
Top = 2
Width = 1057
Height = 473
Legend.Alignment = laTop
Legend.CheckBoxes = True
Legend.ColorWidth = 5
Legend.Symbol.Width = 5
Title.Text.Strings = (
'Test Legend')
View3D = False
Align = alClient
Color = clWhite
TabOrder = 0
OnMouseDown = chrtTstMouseDown
OnMouseUp = chrtTstMouseUp
ColorPaletteIndex = 13
object ctScrollBar: TLegendScrollBar
ArrowBrush.Color = 10671002
BackColor = 8095338
Brush.Color = clWhite
Brush.BackColor = 8095338
DrawStyle = dsWhenNeeded
Pen.Color = clWindowFrame
Size = 15
Thumb.Brush.Color = clSilver
Thumb.Brush.BackColor = clSilver
Thumb.Gradient.EndColor = 10790258
Thumb.Gradient.StartColor = 10790258
Thumb.Gradient.Visible = True
Thumb.Size = 17
ThumbBrush.Color = clSilver
ThumbBrush.BackColor = clSilver
ThumbSize = 17
end
end
Additionally at Runtime:
chrtTst.Legend.ColumnWidthAuto := False;
chrtTst.Legend.ColumnWidths[0] := GetWidestTitle; (my code - returns a reasonable number)
chrtTst.Legend.VertMargin := ctScrollBar.Size + 7; (when scroll bar is active)
How can I overcome problems with thumb/mouse positioning and also perhaps the thumb "locking", as described above? I am trying to keep the Legend position, and fixed column widths if possible.
Thanks..
Legend scroll bar set up as DrawStyle = dsWhenNeeded
When user drags the Legend Scrollbar Thumb with the mouse, the thumb does not stay with the mouse cursor. This does elminate the dsWhenNeeded problem below.
Legend scroll bar set up as DrawStyle = dsAlways : Thumb can be dragged all the way to the right, where it gets "locked" or "stuck" and cannot be pulled back to the left with the mouse, or moved back with the left arrow. This still has the dsWhenNeeded problem above.
Delphi 2009, TeeChart Pro v8.04.11395 Win32 (XP)
object chrtTst: TChart
Left = 2
Top = 2
Width = 1057
Height = 473
Legend.Alignment = laTop
Legend.CheckBoxes = True
Legend.ColorWidth = 5
Legend.Symbol.Width = 5
Title.Text.Strings = (
'Test Legend')
View3D = False
Align = alClient
Color = clWhite
TabOrder = 0
OnMouseDown = chrtTstMouseDown
OnMouseUp = chrtTstMouseUp
ColorPaletteIndex = 13
object ctScrollBar: TLegendScrollBar
ArrowBrush.Color = 10671002
BackColor = 8095338
Brush.Color = clWhite
Brush.BackColor = 8095338
DrawStyle = dsWhenNeeded
Pen.Color = clWindowFrame
Size = 15
Thumb.Brush.Color = clSilver
Thumb.Brush.BackColor = clSilver
Thumb.Gradient.EndColor = 10790258
Thumb.Gradient.StartColor = 10790258
Thumb.Gradient.Visible = True
Thumb.Size = 17
ThumbBrush.Color = clSilver
ThumbBrush.BackColor = clSilver
ThumbSize = 17
end
end
Additionally at Runtime:
chrtTst.Legend.ColumnWidthAuto := False;
chrtTst.Legend.ColumnWidths[0] := GetWidestTitle; (my code - returns a reasonable number)
chrtTst.Legend.VertMargin := ctScrollBar.Size + 7; (when scroll bar is active)
How can I overcome problems with thumb/mouse positioning and also perhaps the thumb "locking", as described above? I am trying to keep the Legend position, and fixed column widths if possible.
Thanks..