Page 1 of 1

Flickerfree PanelGadget

Posted: Wed Jun 27, 2007 5:03 pm
by ts-soft
SmartWindowRefresh do nothing with PanelGadget. With DoubleBuffer-API
i have 100% CPU usage (only with PanelGadget)

I can't use a PanelGadget in a windows with #PB_Window_SizeGadget style

Please change the PanelGadget to a more flickerfree one

I use most a splitter and a editor or scintilla in the PanelGadget

Posted: Wed Jun 27, 2007 5:23 pm
by hallodri
Example :

Code: Select all

hWnd = OpenWindow(0,#PB_Ignore,#PB_Ignore,640,480,"leer",#WS_OVERLAPPEDWINDOW)
SmartWindowRefresh(0,1)

CreateGadgetList(hWnd)

PanelGadget(0,0,0,640,480) 
AddGadgetItem(0,0,"test")
EditorGadget(1,0,0,0,0)
CloseGadgetList()
EditorGadget(2,0,0,0,0)

SplitterGadget(3,0,0,640,480,0,2)


Repeat
	event = WaitWindowEvent()

  If event = #PB_Event_SizeWindow 
    ResizeGadget(3,0,0,WindowWidth(0),WindowHeight(0))
    ResizeGadget(1,0,0,GetGadgetAttribute(0,#PB_Panel_ItemWidth),GetGadgetAttribute(0,#PB_Panel_ItemHeight))
  EndIf
  
Until event = #PB_Event_CloseWindow