ISplitter::MoveSplitter method

Moves a specified splitter bar by a given displacement.

Defined in: SplitterLayout.h

Return Value

Returns the actual displacement of the splitter. It may be different than the szDelta parameter if the splitter could not be moved for some reason like out of bounds problems or if the column or row has reached a width of 0.

Parameters

iRow

Row position of the cell, based on 0. Set this parameter to -1 if only interested in moving the vertical bar.

iCol

Column position of the cell, based on 0. Set this parameter to -1 if only interested in moving the horizontal bar.

szDelta

Movement desired for the splitter bars specified with the coordinates (iRow, iCol). If either of those parameters is -1, only the value in szDelta corresponding to the given coordinate is considered.

Comments

The effect of moving the splitter can be achieved with either the MoveSplitter method or the ISplitter::SetSplitterPosition method. The main difference is that SetSplitterPosition receives the exact position where you want to set the splitter bars, whereas MoveSplitter rather concentrates in the number of units you want to move the splitter from its current position.

Syntax

CSize szActualDisplacement = pSplitter-&gtMoveSplitter(iRow, iCol, szDelta);