Modify

Opened 17 years ago

Closed 17 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: 3.3.0.0 Severity: None
Keywords: GUI Cc:

Description

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)
GUISetState(@SW_SHOW)

Do
	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()
Until $Msg = $GUI_EVENT_CLOSE
Exit

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

Attachments (0)

Change History (1)

comment:1 by Valik, 17 years ago

Resolution: No Bug
Status: newclosed

Read the documentation, please.

Modify Ticket

Action
as closed The ticket will remain with no owner.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.