Page 1 of 2

ListIcon SetGadgetItemColor - PB 4.02 win

Posted: Wed May 02, 2007 12:05 pm
by srod
Hi,

I apologise if this has already been reported.

Run the following with xp themes enabled and select an item:

Code: Select all

OpenWindow(0, 100, 100, 300, 100, "ListIcon Example", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)
CreateGadgetList(WindowID(0))
  ListIconGadget(0, 5, 5, 290, 90, "Name", 100, 0)
  AddGadgetColumn(0, 1, "Address", 250)
  AddGadgetItem(0, -1, "Harry Rannit"+Chr(10)+"12 Parliament Way, Battle Street, By the Bay")
    SetGadgetItemColor(0, 0,  #PB_Gadget_BackColor, #Red, 0)
  AddGadgetItem(0, -1, "Ginger Brokeit"+Chr(10)+"130 PureBasic Road, BigTown, CodeCity")
    SetGadgetItemColor(0, 1,  #PB_Gadget_BackColor, #Red, 0)

  Repeat
    Event = WaitWindowEvent()
  Until Event = #PB_Event_CloseWindow
I see redrawing problems with the listicon (column 0) on resizing column 0 or moving the window offscreen and back etc.

I could of course remove xp styles from the listicon, but I'd rather not do this.


**EDIT: okay, seems to be a Windows thing as the same thing happens when I use straight api to colour the items.

Posted: Wed May 02, 2007 12:15 pm
by Derek
Done all that you said but I couldn't get a single glitch out of it. :?

Posted: Wed May 02, 2007 12:20 pm
by srod
You have xp themes enabled?

Posted: Wed May 02, 2007 12:22 pm
by Derek
Most definately.

Posted: Wed May 02, 2007 12:24 pm
by srod
That's weird, must be my barmy machine! I'm running XP pro sp2.

I wonder if anyone else gets the same problem?

Posted: Wed May 02, 2007 12:27 pm
by Derek
By themes you do mean 'enable xp skin support' don't you?

Or am I missing something here, like some kind of Microsoft theme-y thing?

Posted: Wed May 02, 2007 12:29 pm
by srod
Yes, that's exactly what I mean.

Every example I can find throws up exactly the same problem. This is strange.

Wonder if it is my graphics driver?

Posted: Wed May 02, 2007 12:35 pm
by milan1612
I see no problems, too.
Maybe a corrupt DLL or Window Style?

Posted: Wed May 02, 2007 12:45 pm
by Sparkie
I'm with you srod, same redraw problems when I select an item.

Posted: Wed May 02, 2007 12:49 pm
by srod
Ah, it was getting a little lonely! :)

I was just investigating the version of the common controls library installed on my machine; 5.82.2900.2982.

I'll rummage around the web to see if anyone else has reported this.

Posted: Wed May 02, 2007 12:53 pm
by Sparkie
I've got 5.82.2900.2180

Posted: Wed May 02, 2007 1:01 pm
by Derek
I've got the same as srod. But I'm using xp home, maybe if Sparkie updates to the same then that might cure the problem for him, if indeed this is the cause of the problem.

Posted: Wed May 02, 2007 1:16 pm
by srod
Derek wrote:I've got the same as srod. But I'm using xp home, maybe if Sparkie updates to the same then that might cure the problem for him, if indeed this is the cause of the problem.
Unlikely then that the common controls lib is at fault if everything runs fine on your machine with the same version.

Posted: Wed May 02, 2007 1:56 pm
by Derek
Like you said before, maybe a graphics driver problem, but for some reason I doubt it. I'm sure if your driver was at fault it would have shown up before now. :?

Anyone else out there got the program working or not?

Posted: Wed May 02, 2007 2:27 pm
by PB
> Done all that you said but I couldn't get a single glitch out of it. :?

Same. No problems here. Srod, can you post a screenshot to show what happens?