Modify

Opened 17 years ago

Closed 17 years ago

#608 closed Bug (Fixed)

GUICtrlSetBkColor not working properly on ListView control

Reported by: MsCreatoR <mscreator@…> Owned by: J-Paul Mesnage
Milestone: 3.2.13.9 Component: AutoIt
Version: 3.2.13.8 Severity: None
Keywords: Background Color ListView Cc:

Description

When GUICtrlSet(Bk)Color() function used on ListView control, there is need to redraw the window to see the changes:

Reproducing Example:

#include <GuiConstants.au3>

$hGUI = GUICreate("Test Script", 570, 200)

$ListView = GUICtrlCreateListView("Column", 20, 10, 260, 150)
GUICtrlCreateListViewItem("Item", $ListView)

$ListBox = GUICtrlCreateList("", 290, 10, 260, 150)

$SetColor_Button = GUICtrlCreateButton("Set Bk Color", 20, 170, 70, 20)
$Redraw_CheckBox = GUICtrlCreateCheckbox("Redraw", 120, 170)

GUISetState(@SW_SHOW, $hGUI)

While 1
	Switch GUIGetMsg()
		Case $GUI_EVENT_CLOSE
			Exit
		Case $SetColor_Button
			GUICtrlSetBkColor($ListBox, 0x0000FF)
			
			GUICtrlSetBkColor($ListView, 0x0000FF)
			GUICtrlSetColor($ListView, 0xFFFFFF)
			
			If GUICtrlRead($Redraw_CheckBox) = 1 Then _
				DllCall("User32.dll", "int", "RedrawWindow", "hwnd", $hGUI, "ptr", 0, "int", 0, "int", 5)
	EndSwitch
WEnd

As the example shows, with other controls (such as ListBox) the function work correctly, but ListView needs to be redrawn.

Reproducable on 3.2.8.1, 3.2.10.0, 3.2.12.0/1, 3.2.13.4/8 (beta).

Thanks.

Attachments (0)

Change History (1)

comment:1 by J-Paul Mesnage, 17 years ago

Milestone: 3.2.13.9
Owner: set to J-Paul Mesnage
Resolution: Fixed
Status: newclosed

Fixed in version: 3.2.13.9

Modify Ticket

Action
as closed The owner will remain J-Paul Mesnage.

Add Comment


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