HeaderPane
Main
Hide

SftTree/DLL 8.0 - Tree Control

Share Link
Print

SplitterOffsetMin

Defines a minimum splitter bar offset to prevent the user from hiding the left pane of a split tree control.

C

void WINAPI SftTreeSplit_SetSplitterOffsetMin(HWND hwndCtl, int minOffset);
int WINAPI SftTreeSplit_GetSplitterOffsetMin(HWND hwndCtl);

C++

void CSftTreeSplit::SetSplitterOffsetMin(int minOffset);
int CSftTreeSplit::GetSplitterOffsetMin() const;

Parameters

hwndCtl

The window handle of the tree control.

minOffset

The minimum splitter bar offset in caller-reference (96-DPI) pixels, measured from the left edge of the tree control's client area. A value of 0 (the default) preserves the traditional no-floor behavior, allowing the user to drag the splitter flush to the left edge.

Returns

GetSplitterOffsetMin returns the current minimum splitter offset in caller-reference (96-DPI) pixels.

Comments

The SetSplitterOffsetMin and GetSplitterOffsetMin functions define and retrieve a minimum splitter offset. They apply only to a split tree control.

Once set, the minimum is honored by every mechanism that moves the splitter: mouse drag of the splitter bar, keyboard resize (EnterResizeMode), and programmatic calls to SetSplitterOffset. Offsets below the minimum are clamped to the minimum value.

The minimum offset is stored in caller-reference (96-DPI) pixels. When the left tree has opted into SFTTREE_PIXELSCALING_STRETCH, the effective floor on screen is scaled to the current monitor DPI, matching the pixel-scaling convention. Serialized configurations remain portable between machines of different DPI.

GetSplitterOffset returns the current splitter offset; SetSplitterOffset sets it; MakeSplitterOptimal repositions it so the left pane shows its columns without a horizontal scroll bar. All three honor the minimum established by SetSplitterOffsetMin.

See Also C/C++ API | Categories | Notifications