It's so bad that an entire DeFlicker module was written by PureLust to fix it (see http://www.purebasic.fr/english/viewtop ... 60#p511260).
If you set #EnablePanel=0 in this example and then resize the window vertically, there is NO flickering at all.
So, I'd like to see this problem fixed so that the large dedicated deflicker module isn't needed at all.
Code: Select all
#EnablePanel=1 ; If set to 1, it makes ListIconGadget #2 flicker badly when window is resized vertically!
OpenWindow(0, 200, 200, 230, 180, "SplitterGadget", #PB_Window_SystemMenu | #PB_Window_MaximizeGadget | #PB_Window_SizeGadget)
CreateStatusBar(0,WindowID(0))
CompilerIf #EnablePanel=1
PanelGadget(0, 10, 10, 210, 160)
AddGadgetItem(0,-1,"Tab 1")
CompilerEndIf
ListIconGadget(1, 10, 10, 200, 150, "1", 200)
For i=1 To 100
AddGadgetItem(1, -1, Str(i))
Next
ListIconGadget(2, 10, 10, 200, 150, "2", 200)
For i=1 To 100
AddGadgetItem(2, -1, Str(i))
Next
SplitterGadget(3, 10, 10, 180, 110, 1, 2, #PB_Splitter_Vertical | #PB_Splitter_Separator | #PB_Splitter_FirstFixed)
CompilerIf #EnablePanel=1
AddGadgetItem(0,-1,"Tab 2")
CloseGadgetList()
CompilerEndIf
Procedure ResizeApp()
appw=WindowWidth(0)
apph=WindowHeight(0)
CompilerIf #EnablePanel=1
ResizeGadget(0,#PB_Ignore,#PB_Ignore,appw-20,apph-40)
CompilerEndIf
ResizeGadget(3,#PB_Ignore,#PB_Ignore,appw-45,apph-90)
EndProcedure
Procedure Callback(hWnd,Message,wParam,lParam)
result=#PB_ProcessPureBasicEvents
If Message=#WM_WINDOWPOSCHANGED
ResizeApp()
EndIf
ProcedureReturn result
EndProcedure
SetWindowCallback(@Callback())
ResizeApp() ; Set initial size.
Repeat : Until WaitWindowEvent() = #PB_Event_CloseWindow