[Lazarus] TSplitter refuses to move to the left with mouse (but moves via code)
juergen.hestermann at gmx.de
Mon Mar 27 14:24:32 CEST 2017
Am 2017-03-20 um 18:04 schrieb Jürgen Hestermann via Lazarus:
> I have a TSplitter that separates elements on the left from those on the right.
> But when I try to move the splitter with the mouse,
> only moving to the right works okay.
> Moving to the left only moves the splitter 1 pixel (I think).
> Moving it again moves it another 1 pixel and so on.
> But I cannot move it multiple pixels in one step (as I can when
> moving the right).
> Is this a bug?
It seems that this is a bug.
When I look at TCustomSplitter.MoveSplitter
there is a loop over all anchored controls
that calculates a value CurMaxShrink.
It seems that this routine only considers to "shrink"
these anchored controls (when the splitter moves) but
it is not taken into account to "move" these controls.
That's a bug IMO.
If a control cannot be shrinked but can be moved
then this should work too.
I have anchored some controls to the left
which themselves have no anchor to their left side
but their size is determined via AutoSize.
They are "right aligned" so to speak.
If I move the splitter to the left via code it works as expected
and the anchored controls on the left are moved too.
But when using the mouse then TCustomSplitter.MoveSplitter
restricts the movement of the splitter to the
"shrinkability" of the anchored controls only.
More information about the Lazarus