AutoIt - AutoItScript
Listed below are the questions that we are asked quite often. Before you write us, be sure to check here.



The chart area is black until you click in the header area, and then it becomes visible. Is there any fix to that?

The AutoIt IDE removes the WS_CLIPCHILDREN window style when creating the component. The WS_CLIPCHILDREN window style excludes the area occupied by child windows when drawing occurs within the parent window. The AutoIt documentation of GUICtrlCreateObj methods says: "'Document Objects' will only be visible if the Windows style $WS_CLIPCHILDREN has been used in GUICreate().".

The following script shows how you can add the WS_CLIPCHILDREN and WS_CLIPCHILDREN styles to the form and the component itself.

$gui_width = 500
$gui_height = 500
$gui = guicreate("TEST", $gui_width, $gui_height, default, default, bitor($GUI_SS_DEFAULT_GUI, $ws_clipchildren, $ws_clipsiblings))
$obj_gantt = objcreate("Exontrol.Gantt.1")
$gantt_control = GUICtrlCreateObj($obj_gantt, 20, 20, $gui_width - 40, $gui_height - 40)
guictrlsetstyle($gantt_control, $ws_clipchildren + $ws_clipsiblings)

The guictrlsetstyle method adds the WS_CLIPCHILDREN and WS_CLIPCHILDREN styles to the component itself, so the black area will not be displayed anymore.

Thanks to Jonah Coleman, Fletcher Wood Products, Inc who submitted the note. This note is related to AutoIT3

Copyright 1999-2018 Exontrol. All rights reserved.