Modify

Opened 11 years ago

Closed 11 years ago

#608 closed Bug (Fixed)

GUICtrlSetBkColor not working properly on ListView control

Reported by: MsCreatoR <mscreator@…> Owned by: Jpm
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 Changed 11 years ago by Jpm

  • Milestone set to 3.2.13.9
  • Owner set to Jpm
  • Resolution set to Fixed
  • Status changed from new to closed

Fixed in version: 3.2.13.9

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 owner will remain Jpm.
Author


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

 
Note: See TracTickets for help on using tickets.