Opened 15 years ago

Closed 15 years ago

#959 closed Bug (No Bug)

GUICtrlGetState doesn't work for listview with enable flag

Reported by: benm@… Owned by:
Milestone: Component: AutoIt
Version: Severity: None
Keywords: GUI Cc:


Hi All,
It seems that GUICtrlGetState doesn't work with a listview.
You can see in script below there is no change regardless of whether the listview is disabled or enabled. I'm using this to try to reduce flicker. Thank you.
--Ben benm@…

#include <ListViewConstants.au3>
#include <GuiConstantsEx.au3>
$FormHelicoil = GUICreate("FormHelicoil", 852, 528)
Local $lis_helicoil = GUICtrlCreateListView("Helicoils", 48, 118, 241, 313)
GUICtrlCreateListViewItem("Hello", $lis_helicoil)
GUICtrlCreateListViewItem("Hello2", $lis_helicoil)

	GUICtrlSetState($lis_helicoil, $GUI_DISABLE)
	MsgBox(0, "IsControl Enabled?", isControlEnabled($lis_helicoil))
	GUICtrlSetState($lis_helicoil, $GUI_ENABLE)
	MsgBox(0, "IsControl Enabled?", isControlEnabled($lis_helicoil))

	$Msg = GUIGetMsg()

Func isControlEnabled(ByRef $tControl)
	;Return GUICtrlGetState($tControl)
	If BitAND(GUICtrlGetState($tControl), $GUI_ENABLE) = $GUI_ENABLE Then
		Return 1
		Return 0
EndFunc   ;==>isControlEnabled

Attachments (0)

Change History (1)

comment:1 Changed 15 years ago by Valik

  • Resolution set to No Bug
  • Status changed from new to closed

Read the documentation, please.

Guidelines for posting comments:

  • You cannot re-open a ticket but you may still leave a comment if you have additional information to add.
  • In-depth discussions should take place on the forum.

For more information see the full version of the ticket guidelines here.

Add Comment

Modify Ticket

as closed The ticket will remain with no owner.

E-mail address and user name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.