staringfrog wrote:By the way, Stargate, do you use any "intelligent double buffering" (as Chris put it) in your gadget? I have noticed that active resizing of 5 TabBar tabs in a row (that is, resizing of tab widths themselves, with #TabBarGadget_MinTabLength flag, proportionally to the overall form width) isn't quite flicker-free on my themed WinXP.
I have testing this code:
Code: Select all
IncludeFile "TabBarGadget.pbi"
Enumeration
#Window
#Gadget
EndEnumeration
Procedure Callback()
ResizeGadget(#Gadget, 0, 0, WindowWidth(#Window), 25)
SetTabBarGadgetAttribute(#Gadget, #TabBarGadget_MinTabLength, Int((WindowWidth(#Window)-TabBarGadgetInclude\Margin)/CountTabBarGadgetItems(#Gadget)))
EndProcedure
OpenWindow(#Window, 0, 0, 800, 600, "WindowTitle", #PB_Window_MinimizeGadget|#PB_Window_ScreenCentered|#PB_Window_SizeGadget)
TabBarGadget(#Gadget, 0, 0, 800, 25, #Null, #Window)
AddTabBarGadgetItem(#Gadget, 0, "tab 1")
AddTabBarGadgetItem(#Gadget, 1, "tab 2")
AddTabBarGadgetItem(#Gadget, 2, "tab 3")
AddTabBarGadgetItem(#Gadget, 3, "tab 4")
AddTabBarGadgetItem(#Gadget, 4, "tab 5")
BindEvent(#PB_Event_SizeWindow, @Callback())
Callback()
Repeat : Until WaitWindowEvent() = #PB_Event_CloseWindow
I can't see any flicker.
Node: If you set a min tab width (depending on the gadget width) you have to subtract the tab bar margin and rounding down.