Flickerfree PanelGadget

Got an idea for enhancing PureBasic? New command(s) you'd like to see?
User avatar
ts-soft
Always Here
Always Here
Posts: 5756
Joined: Thu Jun 24, 2004 2:44 pm
Location: Berlin - Germany

Flickerfree PanelGadget

Post 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
PureBasic 5.73 | SpiderBasic 2.30 | Windows 10 Pro (x64) | Linux Mint 20.1 (x64)
Old bugs good, new bugs bad! Updates are evil: might fix old bugs and introduce no new ones.
Image
User avatar
hallodri
Enthusiast
Enthusiast
Posts: 208
Joined: Tue Nov 08, 2005 7:59 am
Location: Germany
Contact:

Post 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
Post Reply