MCPcopy Create free account
hub / github.com/AutoHotkey/AutoHotkey / ControlSetTreeViewOptions

Method ControlSetTreeViewOptions

source/script_gui.cpp:9777–9798  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

9775
9776
9777void GuiType::ControlSetTreeViewOptions(GuiControlType &aControl, GuiControlOptionsType &aOpt)
9778// Caller has ensured that aControl.type is TreeView.
9779// Caller has ensured that aOpt.color_bk is CLR_INVALID if no change should be made to the
9780// current background color.
9781{
9782 if (aOpt.color != CLR_INVALID) // Explicit color change was requested.
9783 {
9784 TreeView_SetTextColor(aControl.hwnd, aOpt.color == CLR_DEFAULT ? -1 : aOpt.color); // Must pass -1 rather than CLR_DEFAULT for TreeView controls.
9785 aOpt.color = CLR_INVALID; // Let ControlParseOptions() know we handled it.
9786 }
9787 if (aOpt.color_bk != CLR_INVALID)
9788 TreeView_SetBkColor(aControl.hwnd, aOpt.color_bk == CLR_DEFAULT ? -1 : aOpt.color_bk);
9789 // Disabled because it apparently is not supported on XP:
9790 //if (aOpt.tabstop_count)
9791 // // Although TreeView_GetIndent() confirms that the following takes effect, it doesn't seem to
9792 // // cause any visible change, at least under XP SP2 (tried various style changes as well as Classic vs.
9793 // // XP theme, as well as the "-Theme" option.
9794 // TreeView_SetIndent(aControl.hwnd, aOpt.tabstop[0]);
9795
9796 // Unlike ListView, seems not to be needed:
9797 //InvalidateRect(aControl.hwnd, NULL, TRUE);
9798}
9799
9800
9801

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected