Modify

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: 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 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

Action
as closed The ticket will remain with no owner.
Author


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

 
Note: See TracTickets for help on using tickets.