Generic FunctionPackage: cgToCDocOverviewCGDocRelNotesFAQIndexPermutedIndex
Allegro CL version 9.0
Unrevised from 8.2 to 9.0.
8.2 version

on-drag

Arguments: split-bar

Returns the on-drag property of a split-bar widget. The value may be set at creation time by passing the :on-drag initarg to make-instance, or any time later by call (setf on-drag).

The value of this property should be the name of a function that will be called repeatedly as the user drags the split-bar interactively, or else nil to not call an on-drag function at all. The default value is nil. You may use setf to set the value of this property.

Typically it is more convenient to use the min-space-before and min-space-after properties to constrain split-bar movement, when that is adequate.

When the value is a function, it will be called once each time the system notices that the split-bar has moved to a new position during a drag. The function should accept two arguments, which will be the split-bar widget and an integer indicating the new position. The function should return an integer indicating the position to which the split-bar should be constrained. The return value should therefore be the value argument itself whenever there is no need to constrain the movement. An on-drag function may also perform arbitrary side effects before returning the constrained position integer.

The position integer argument works like the value property of the split-bar, indicating the distance in pixels from the top of the parent window's interior to the split-bar when it is horizontal, or the distance from the left side of the parent window's interior to a vertical split-bar.

The widgets in the widgets-to-move and widgets-to-resize properties will still be moved and resized as usual when there is an on-drag function, though they will be moved and resized according the new split-bar position as it was constrained by the on-drag function as well as by the min-space-before and min-space-after properties.


Copyright (c) 1998-2019, Franz Inc. Oakland, CA., USA. All rights reserved.
This page was not revised from the 8.2 page.
Created 2012.5.30.

ToCDocOverviewCGDocRelNotesFAQIndexPermutedIndex
Allegro CL version 9.0
Unrevised from 8.2 to 9.0.
8.2 version