Vista / ListIcon

Everything else that doesn't fall into one of the other PB categories.
srod
PureBasic Expert
PureBasic Expert
Posts: 10589
Joined: Wed Oct 29, 2003 4:35 pm
Location: Beyond the pale...

Vista / ListIcon

Post by srod »

Code: Select all

If OpenWindow(0, 100, 100, 300, 100, "ListIcon Example", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)
  ListIconGadget(0, 5, 5, 290, 90, "Name", 100, #PB_ListIcon_FullRowSelect|#PB_ListIcon_AlwaysShowSelection)
   
  For i = 0 To 20
    AddGadgetColumn(0, i, "Column "+Str(i), 80)
  Next

  Repeat
     Event = WaitWindowEvent()
  Until Event = #PB_Event_CloseWindow
EndIf
When I run the above on Vista with themes enabled, the horizontal scrollbar does not appear until I resize a column! No probs on XP.

Can anyone else confirm?
I may look like a mule, but I'm not a complete ass.
moogle
Enthusiast
Enthusiast
Posts: 372
Joined: Tue Feb 14, 2006 9:27 pm
Location: London, UK

Re: Vista / ListIcon

Post by moogle »

Appears on the start for me (Vista Ultimate x64 SP2)


EDIT: Just saw the themes bit and -> Enable XP Skin Support, and it no longer does until like you said, resizing the columns.

Anyway this seems like a quick fix for it

Code: Select all

If OpenWindow(0, 100, 100, 300, 100, "ListIcon Example", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)
  ListIconGadget(0, 5, 5, 290, 90, "Name", 100, #PB_ListIcon_FullRowSelect|#PB_ListIcon_AlwaysShowSelection)
   
  For i = 0 To 20
    AddGadgetColumn(0, i, "Column "+Str(i), 80)
  Next
; 	SetGadgetItemAttribute(0, 20, #PB_Explorer_ColumnWidth , 81)
; 	SetGadgetItemAttribute(0, 20, #PB_Explorer_ColumnWidth , 80)
	HideGadget(0,1)
	HideGadget(0,0)
  Repeat
     Event = WaitWindowEvent()
  Until Event = #PB_Event_CloseWindow
EndIf
Last edited by moogle on Mon Dec 07, 2009 2:07 pm, edited 2 times in total.
Image
srod
PureBasic Expert
PureBasic Expert
Posts: 10589
Joined: Wed Oct 29, 2003 4:35 pm
Location: Beyond the pale...

Re: Vista / ListIcon

Post by srod »

It is strange - the scroll info messages are telling me that the scrolling range is zero. If I hide the control and then show it again (via HideGadget()) then the scrollbar appears and the scrolling range is reported correctly. Looks like a bug with the control itself.
I may look like a mule, but I'm not a complete ass.
Denis
Enthusiast
Enthusiast
Posts: 790
Joined: Fri Apr 25, 2003 5:10 pm
Location: Doubs - France

Re: Vista / ListIcon

Post by Denis »

The same on Seven x86

With themes disabled, it's Ok
A+
Denis
Post Reply