How to stop ListIconGadget from flickering on resize?
Posted: Mon Sep 01, 2008 10:12 pm
Is there any way to prevent the ListIconGadget from flickering on resize?
Code: Select all
#Gadget1=0
#Gadget2=1
#Splitter=2
Procedure WinCallback(hWnd, uMsg, wParam, lParam)
Result=#PB_ProcessPureBasicEvents
Select uMsg
Case #WM_SIZE
ResizeGadget(#Splitter,0,0,WindowWidth(0),WindowHeight(0))
EndSelect
ProcedureReturn Result
EndProcedure
If OpenWindow(0,0,0,230,180,"SplitterGadget",#PB_Window_SystemMenu|#PB_Window_ScreenCentered|#PB_Window_SizeGadget)
If CreateGadgetList(WindowID(0))
ListIconGadget(#Gadget1,0,0,220,60,"",50)
ListIconGadget(#Gadget2,0,0,0,0,"",50)
SplitterGadget(#Splitter,0,0,230,180,#Gadget1,#Gadget2)
SmartWindowRefresh(0,1)
SetWindowCallback(@WinCallback())
Repeat
Until WaitWindowEvent()=#PB_Event_CloseWindow
EndIf
EndIf